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-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
}
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
switch (pack.si.si_signo)
{
case __SIGCOMMUNE:
- talktome ();
+ talktome (pack.si);
break;
case __SIGSTRACE:
strace.hello ();