diff options
author | Christopher Faylor <me@cgf.cx> | 2005-09-19 14:15:06 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-09-19 14:15:06 +0000 |
commit | 1bde6e09a629f9c5abb4ddccdc973fd8055d6b27 (patch) | |
tree | ae4b7e9602927295591d9a017206fc082e38b867 | |
parent | 64cf26a0e9247a3127d2fe01bd27c86a4e1fbb01 (diff) | |
download | newlib-1bde6e09a629f9c5abb4ddccdc973fd8055d6b27.zip newlib-1bde6e09a629f9c5abb4ddccdc973fd8055d6b27.tar.gz newlib-1bde6e09a629f9c5abb4ddccdc973fd8055d6b27.tar.bz2 |
* sigproc.cc (talktome): Take siginfo_t argument. Don't scan all pids trying
to find one that's talking to me. Just use the pid from siginfo_t.
(wait_pid): Pass siginfo_t argument to talktome.
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/sigproc.cc | 12 |
2 files changed, 12 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 48cf936..d50eda5 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2005-09-19 Christopher Faylor <cgf@timesys.com> + + * sigproc.cc (talktome): Take siginfo_t argument. Don't scan all pids + trying to find one that's talking to me. Just use the pid from + siginfo_t. + (wait_pid): Pass siginfo_t argument to talktome. + 2005-09-17 Christopher Faylor <cgf@timesys.com> * pipe.cc (fhandler_pipe::open): Use 'cfree' to free buffer since it is diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 3766df7..59f7996 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -922,13 +922,11 @@ stopped_or_terminated (waitq *parent_w, _pinfo *child) } static void -talktome () +talktome (siginfo_t& si) { - winpids pids ((DWORD) PID_MAP_RW); - for (unsigned i = 0; i < pids.npids; i++) - if (pids[i]->hello_pid == myself->pid) - if (!IsBadWritePtr (pids[i], sizeof (_pinfo))) - pids[i]->commune_recv (); + pinfo p (si.si_pid, PID_MAP_RW); + if (p) + p->commune_recv (); } void @@ -1041,7 +1039,7 @@ wait_sig (VOID *self) switch (pack.si.si_signo) { case __SIGCOMMUNE: - talktome (); + talktome (pack.si); break; case __SIGSTRACE: strace.hello (); |