Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-01-16 20:00:27 +0300
committerChristopher Faylor <me@cgf.cx>2005-01-16 20:00:27 +0300
commit85b3fb9640eb423a640d86ccc713e91e0872fc8c (patch)
tree65f287390f52157eb16c9cb0016a0d6f06a5728f /winsup/cygwin/fhandler_process.cc
parentfdd857a1f6d5e68b212aaca8572f6b6c13b080d8 (diff)
* 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/fhandler_process.cc')
-rw-r--r--winsup/cygwin/fhandler_process.cc10
1 files changed, 5 insertions, 5 deletions
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, "<defunct>");
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, "<defunct>");
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, "<defunct>");
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';