diff options
author | Christopher Faylor <me@cgf.cx> | 2005-01-16 17:00:27 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-01-16 17:00:27 +0000 |
commit | 85b3fb9640eb423a640d86ccc713e91e0872fc8c (patch) | |
tree | 65f287390f52157eb16c9cb0016a0d6f06a5728f /winsup/cygwin/sigproc.cc | |
parent | fdd857a1f6d5e68b212aaca8572f6b6c13b080d8 (diff) | |
download | cygnal-85b3fb9640eb423a640d86ccc713e91e0872fc8c.tar.gz cygnal-85b3fb9640eb423a640d86ccc713e91e0872fc8c.tar.bz2 cygnal-85b3fb9640eb423a640d86ccc713e91e0872fc8c.zip |
* init.cc (dll_entry): Remove unused extern.
* include/sys/cygwin.h: Remove PID_ZOMBIE.
* pinfo.h: Rename EXITCODE_* defines.
(pinfo::set_exit_state): Remove parameter.
* pinfo.cc (set_exit_state): Remove parameter. Reverse sense of test so that
exitcode is checked for having been set rather than not having been set. Set
flag when exitcode has been established. Don't set PID_STATE here.
(pinfo::init): Remove exitcode initialization.
(pinfo::exit): Reflect change in EXITCODE_* naming. Set flag when exitcode has
been established. Reflect change in arguments to set_process_state.
(proc_waiter): Reflect change in arguments to set_process_state. Set
process_state here and only here.
* fhandler_process.cc (fhandler_process::fill_filebuf): Reflect removal of
PID_ZOMBIE define.
(format_process_stat): Ditto.
(format_process_status): Ditto.
* sigproc.cc (pid_exists): Ditto.
(stopped_or_terminated): Ditto. Make sure that only low-order 16 bits of
exitcode are used.
* spawn.cc (spawn_guts): Reflect change in EXITCODE_* naming.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index a87f15868..fb0680867 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -200,7 +200,7 @@ pid_exists (pid_t pid) bool __stdcall proc_exists (_pinfo *p) { - return p && !(p->process_state & (PID_EXITED | PID_ZOMBIE)); + return p && !(p->process_state & PID_EXITED); } /* Return true if this is one of our children, false otherwise. */ @@ -891,7 +891,7 @@ stopped_or_terminated (waitq *parent_w, _pinfo *child) int terminated; - if (!((terminated = (child->process_state == PID_ZOMBIE)) || + if (!((terminated = (child->process_state == PID_EXITED)) || ((w->options & WUNTRACED) && child->stopsig))) return 0; @@ -904,9 +904,9 @@ stopped_or_terminated (waitq *parent_w, _pinfo *child) w->status = (child->stopsig << 8) | 0x7f; child->stopsig = 0; } - else /* Should only get here when child has been moved to the procs array */ + else { - w->status = child->exitcode; + w->status = (__uint16_t) child->exitcode; add_rusage (&myself->rusage_children, &child->rusage_children); add_rusage (&myself->rusage_children, &child->rusage_self); |