* pinfo.cc (pinfo::exit): Don't assume that this == myself.

This commit is contained in:
Christopher Faylor 2005-01-12 18:05:07 +00:00
parent 2538a7ff9b
commit 48befd8305
3 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2005-01-12 Christopher Faylor <cgf@timesys.com>
* pinfo.cc (pinfo::exit): Don't assume that this == myself.
2005-01-11 Christopher Faylor <cgf@timesys.com>
* pinfo.cc (pinfo::init): Don't close input handle on temporary (?)

View File

@ -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;

View File

@ -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)