diff options
author | Christopher Faylor <me@cgf.cx> | 2005-02-26 20:50:25 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-02-26 20:50:25 +0000 |
commit | 1a9a235a5af29c55f5fe84745b595f0d247f888e (patch) | |
tree | 23daad2557637028036061eeba3652115b924b61 /winsup/cygwin/sigproc.cc | |
parent | 92a7e06eb8c5f521079d9e799bfa34f479bc61ba (diff) | |
download | cygnal-1a9a235a5af29c55f5fe84745b595f0d247f888e.tar.gz cygnal-1a9a235a5af29c55f5fe84745b595f0d247f888e.tar.bz2 cygnal-1a9a235a5af29c55f5fe84745b595f0d247f888e.zip |
* debug.cc (delete_handle): Report on handle value in debugging output.
* pinfo.h (_pinfo::exists): Declare "new" function.
(_pinfo::kill): Ditto.
* fhandler_termios.cc (tty_min::kill_pgrp): Use _pinfo::exists rather than
proc_exists.
* pinfo.cc (pinfo::init): Ditto. Don't do a low_priority_sleep(0) when looping
to find exec'ed procinfo.
(pinfo::release): Be more careful about unmapping and closing.
* signal.cc (_pinfo::kill): Rename from kill_worker. Accommodate entry into
_pinfo class.
(kill0): Use _pinfo::kill rather than kill_worker.
(kill_pgrp): Ditto. Use _pinfo::exists rather than proc_exists.
* sigproc.cc (_pinfo::exists): Rename from proc_exists.
(pid_exists): Use _pinfo::exists rather than proc_exists.
(remove_proc): Ditto.
* sigproc.h (proc_exists): Delete declaration.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index c6fa2637b..66e7395ab 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -192,16 +192,15 @@ proc_can_be_signalled (_pinfo *p) bool __stdcall pid_exists (pid_t pid) { - pinfo p (pid); - return proc_exists (p); + return pinfo (pid)->exists (); } /* Test to determine if a process really exists and is processing signals. */ bool __stdcall -proc_exists (_pinfo *p) +_pinfo::exists () { - return p && !(p->process_state & PID_EXITED); + return this && !(process_state & PID_EXITED); } /* Return true if this is one of our children, false otherwise. */ @@ -847,7 +846,7 @@ out: static bool __stdcall remove_proc (int ci) { - if (proc_exists (procs[ci])) + if (procs[ci]->exists ()) return true; sigproc_printf ("removing procs[%d], pid %d, nprocs %d", ci, procs[ci]->pid, |