aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/pinfo.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-01-17 04:12:08 +0000
committerChristopher Faylor <me@cgf.cx>2005-01-17 04:12:08 +0000
commit37d5841f83200da2d481d6b01c111a37acf8ca39 (patch)
treec592a64c0ad15e0fe42b40e6481797d183bd41a3 /winsup/cygwin/pinfo.h
parent459a95619788793541553674eb5bb59888aa7f6a (diff)
downloadnewlib-37d5841f83200da2d481d6b01c111a37acf8ca39.zip
newlib-37d5841f83200da2d481d6b01c111a37acf8ca39.tar.gz
newlib-37d5841f83200da2d481d6b01c111a37acf8ca39.tar.bz2
* pinfo.h (maybe_set_exit_code_from_windows): Renamed from set_exit_state.
* pinfo.cc (pinfo::exit): Use renamed function. (proc_waiter): Ditto. Make a copy of input argument to avoid problems when procs array is shuffled. Flag when copy is made so that remove_proc knows when it is safe to reshuffle. * sigproc.cc (proc_terminate): Don't flag process_state as PID_EXITED. (remove_proc): Wait for waiter to finish copying pinfo element before moving it (an actual wait should be an extremely rare event).
Diffstat (limited to 'winsup/cygwin/pinfo.h')
-rw-r--r--winsup/cygwin/pinfo.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
index fc29139..d202d91 100644
--- a/winsup/cygwin/pinfo.h
+++ b/winsup/cygwin/pinfo.h
@@ -140,6 +140,7 @@ public:
HANDLE rd_proc_pipe;
HANDLE hProcess;
CRITICAL_SECTION _lock;
+ bool waiter_ready;
/* Handle associated with initial Windows pid which started it all. */
class cygthread *wait_thread;
void init (pid_t, DWORD, HANDLE = NULL) __attribute__ ((regparm(3)));
@@ -155,7 +156,7 @@ public:
release ();
}
void exit (DWORD n) __attribute__ ((noreturn, regparm(2)));
- void set_exit_state () __attribute__ ((regparm(2)));
+ void maybe_set_exit_code_from_windows () __attribute__ ((regparm(1)));
void initialize_lock () {InitializeCriticalSection (&_lock);}
void lock () {EnterCriticalSection (&_lock);}
void unlock () {LeaveCriticalSection (&_lock);}