diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5a4c74244..4d86a2013 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-01-12 Christopher Faylor + + * pinfo.cc (pinfo::exit): Don't assume that this == myself. + 2005-01-11 Christopher Faylor * pinfo.cc (pinfo::init): Don't close input handle on temporary (?) diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 689e10be0..2e39ebbd6 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -130,7 +130,6 @@ pinfo::exit (DWORD n) sigproc_terminate (); /* Just terminate signal and process stuff */ self->exitcode = n; /* We're really exiting. Record the UNIX exit code. */ } - sigproc_printf ("1 hProcess %p, n %p, exitcode %p", hProcess, n, self->exitcode); /* FIXME: There is a potential race between an execed process and its parent here. I hated to add a mutex just for this, though. */ @@ -139,11 +138,8 @@ pinfo::exit (DWORD n) add_rusage (&self->rusage_self, &r); set_exit_state (PID_EXITED); - sigproc_printf ("2 hProcess %p, n %p, exitcode %p, EXITCODE_EXEC %p", hProcess, n, self->exitcode, EXITCODE_EXEC); if (n != EXITCODE_EXEC) -{sigproc_printf ("3 hProcess %p, n %p, exitcode %p, EXITCODE_EXE %pC", hProcess, n, self->exitcode, EXITCODE_EXEC); - myself->alert_parent (0); -} + self->alert_parent (0); _my_tls.stacklock = 0; _my_tls.stackptr = _my_tls.stack; diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index a9583ed1e..889d0c782 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1407,7 +1407,7 @@ system (const char *cmdstring) command[2] = cmdstring; command[3] = (const char *) NULL; - if ((res = spawnvp (_P_SYSTEM, "sh", command)) == -1) + if ((res = spawnvp (_P_SYSTEM, "/bin/sh", command)) == -1) { // when exec fails, return value should be as if shell // executed exit (127)