From 85b3fb9640eb423a640d86ccc713e91e0872fc8c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 16 Jan 2005 17:00:27 +0000 Subject: * 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. --- winsup/cygwin/fhandler_process.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin/fhandler_process.cc') diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index ae15008b6..3c996d067 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -315,7 +315,7 @@ fhandler_process::fill_filebuf () case PROCESS_EXENAME: { filebuf = (char *) realloc (filebuf, bufalloc = CYG_MAX_PATH); - if (p->process_state & (PID_ZOMBIE | PID_EXITED)) + if (p->process_state & PID_EXITED) strcpy (filebuf, ""); else { @@ -380,7 +380,7 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize) start_time = 0UL, vmsize = 0UL, vmrss = 0UL, vmmaxrss = 0UL; int priority = 0; - if (p->process_state & (PID_ZOMBIE | PID_EXITED)) + if (p->process_state & PID_EXITED) strcpy (cmd, ""); else { @@ -400,7 +400,7 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize) * Note: under Windows, a _process_ is always running - it's only _threads_ * that get suspended. Therefore the default state is R (runnable). */ - if (p->process_state & PID_ZOMBIE) + if (p->process_state & PID_EXITED) state = 'Z'; else if (p->process_state & PID_STOPPED) state = 'T'; @@ -513,7 +513,7 @@ format_process_status (_pinfo *p, char *destbuf, size_t maxsize) const char *state_str = "unknown"; unsigned long vmsize = 0UL, vmrss = 0UL, vmdata = 0UL, vmlib = 0UL, vmtext = 0UL, vmshare = 0UL; - if (p->process_state & (PID_ZOMBIE | PID_EXITED)) + if (p->process_state & PID_EXITED) strcpy (cmd, ""); else { @@ -533,7 +533,7 @@ format_process_status (_pinfo *p, char *destbuf, size_t maxsize) * Note: under Windows, a _process_ is always running - it's only _threads_ * that get suspended. Therefore the default state is R (runnable). */ - if (p->process_state & PID_ZOMBIE) + if (p->process_state & PID_EXITED) state = 'Z'; else if (p->process_state & PID_STOPPED) state = 'T'; -- cgit v1.2.3