diff options
Diffstat (limited to 'winsup/cygwin/external.cc')
-rw-r--r-- | winsup/cygwin/external.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index 22636aa53..cd86966b8 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -108,7 +108,7 @@ fillout_pinfo (pid_t pid, int winpid) { i = 0; pids.reset (); - return NULL; + return 0; } return &ep; } @@ -186,12 +186,10 @@ static void exit_process (UINT status, bool useTerminateProcess) { pid_t pid = getpid (); - external_pinfo *ep = fillout_pinfo (pid, 1); + external_pinfo * ep = fillout_pinfo (pid, 1); DWORD dwpid = ep ? ep->dwProcessId : pid; pinfo p (pid, PID_MAP_RW); - if (ep) - pid = ep->pid; - if ((dwpid == GetCurrentProcessId()) && (p->pid == pid)) + if ((dwpid == GetCurrentProcessId()) && (p->pid == ep->pid)) p.set_exit_code ((DWORD)status); if (useTerminateProcess) TerminateProcess (GetCurrentProcess(), status); |