Attachment "patch1" to
ticket [1267871fff]
added by
matt-newman
2005-08-24 17:08:01.
diff -x CVS -cwbr /src/sf/tcl8.4.11/win/tclWinPipe.c win/tclWinPipe.c
*** /src/sf/tcl8.4.11/win/tclWinPipe.c Wed Jun 22 22:30:20 2005
--- win/tclWinPipe.c Wed Aug 24 10:45:12 2005
***************
*** 2576,2587 ****
case EXCEPTION_FLT_UNDERFLOW:
case EXCEPTION_INT_DIVIDE_BY_ZERO:
case EXCEPTION_INT_OVERFLOW:
! *statPtr = SIGFPE;
break;
case EXCEPTION_PRIV_INSTRUCTION:
case EXCEPTION_ILLEGAL_INSTRUCTION:
! *statPtr = SIGILL;
break;
case EXCEPTION_ACCESS_VIOLATION:
--- 2576,2587 ----
case EXCEPTION_FLT_UNDERFLOW:
case EXCEPTION_INT_DIVIDE_BY_ZERO:
case EXCEPTION_INT_OVERFLOW:
! *statPtr = 0xC0000000 | SIGFPE;
break;
case EXCEPTION_PRIV_INSTRUCTION:
case EXCEPTION_ILLEGAL_INSTRUCTION:
! *statPtr = 0xC0000000 | SIGILL;
break;
case EXCEPTION_ACCESS_VIOLATION:
***************
*** 2592,2619 ****
case EXCEPTION_INVALID_DISPOSITION:
case EXCEPTION_GUARD_PAGE:
case EXCEPTION_INVALID_HANDLE:
! *statPtr = SIGSEGV;
break;
case CONTROL_C_EXIT:
! *statPtr = SIGINT;
break;
default:
! *statPtr = SIGABRT;
break;
}
} else {
! /*
! * Non exception, normal, exit code. Note that the exit code
! * is truncated to a byte range.
! */
! *statPtr = ((exitCode << 8) & 0xff00);
}
result = pid;
} else {
errno = ECHILD;
! *statPtr = ECHILD;
result = (Tcl_Pid) -1;
}
--- 2592,2615 ----
case EXCEPTION_INVALID_DISPOSITION:
case EXCEPTION_GUARD_PAGE:
case EXCEPTION_INVALID_HANDLE:
! *statPtr = 0xC0000000 | SIGSEGV;
break;
case CONTROL_C_EXIT:
! *statPtr = 0xC0000000 | SIGINT;
break;
default:
! *statPtr = 0xC0000000 | SIGABRT;
break;
}
} else {
! *statPtr = exitCode;
}
result = pid;
} else {
errno = ECHILD;
! *statPtr = 0xC0000000 | ECHILD;
result = (Tcl_Pid) -1;
}
diff -x CVS -cwbr /src/sf/tcl8.4.11/win/tclWinPort.h win/tclWinPort.h
*** /src/sf/tcl8.4.11/win/tclWinPort.h Wed Nov 27 18:13:38 2002
--- win/tclWinPort.h Wed Aug 24 10:50:15 2005
***************
*** 230,244 ****
#endif /* TCL_UNION_WAIT */
#ifndef WIFEXITED
! # define WIFEXITED(stat) (((*((int *) &(stat))) & 0xff) == 0)
#endif
#ifndef WEXITSTATUS
! # define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xff)
#endif
#ifndef WIFSIGNALED
! # define WIFSIGNALED(stat) (((*((int *) &(stat)))) && ((*((int *) &(stat))) == ((*((int *) &(stat))) & 0x00ff)))
#endif
#ifndef WTERMSIG
--- 230,244 ----
#endif /* TCL_UNION_WAIT */
#ifndef WIFEXITED
! # define WIFEXITED(stat) (((*((int *) &(stat))) & 0xC0000000) == 0)
#endif
#ifndef WEXITSTATUS
! # define WEXITSTATUS(stat) (*((int *) &(stat)))
#endif
#ifndef WIFSIGNALED
! # define WIFSIGNALED(stat) ((*((int *) &(stat))) & 0xC0000000)
#endif
#ifndef WTERMSIG
***************
*** 246,252 ****
#endif
#ifndef WIFSTOPPED
! # define WIFSTOPPED(stat) (((*((int *) &(stat))) & 0xff) == 0177)
#endif
#ifndef WSTOPSIG
--- 246,252 ----
#endif
#ifndef WIFSTOPPED
! # define WIFSTOPPED(stat) 0
#endif
#ifndef WSTOPSIG