From 683cc8189ce70bb5f33bec465eebad6effc9bd36 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 26 Sep 2005 13:47:27 +0000 Subject: [PATCH] * pinfo.cc (proc_waiter): Properly fill out si_code as according to SUSv3. * exceptions.cc (handle_exceptions): Properly fill out si_code as according to SUSv3. --- winsup/cygwin/ChangeLog | 7 ++++++- winsup/cygwin/pinfo.cc | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 433119463..4fc427ebe 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,6 +1,11 @@ 2005-09-26 Christopher Faylor - * exceptions.cc (handle_exceptions): Properly fill out si_code. + * pinfo.cc (proc_waiter): Properly fill out si_code as according to SUSv3. + +2005-09-26 Christopher Faylor + + * exceptions.cc (handle_exceptions): Properly fill out si_code as + according to SUSv3. 2005-09-25 Christopher Faylor diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index e4f773c39..2cceb951e 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -939,7 +939,7 @@ proc_waiter (void *arg) siginfo_t si; si.si_signo = SIGCHLD; - si.si_code = SI_KERNEL; + si.si_code = CLD_EXITED; si.si_pid = vchild->pid; si.si_errno = 0; #if 0 // FIXME: This is tricky to get right @@ -975,11 +975,11 @@ proc_waiter (void *arg) vchild.rd_proc_pipe = NULL; vchild.maybe_set_exit_code_from_windows (); if (WIFEXITED (vchild->exitcode)) - si.si_sigval.sival_int = CLD_EXITED; + si.si_code = CLD_EXITED; else if (WCOREDUMP (vchild->exitcode)) - si.si_sigval.sival_int = CLD_DUMPED; + si.si_code = CLD_DUMPED; else - si.si_sigval.sival_int = CLD_KILLED; + si.si_code = CLD_KILLED; si.si_status = vchild->exitcode; vchild->process_state = PID_EXITED; /* This should always be last. Do not use vchild-> beyond this point */ @@ -991,7 +991,7 @@ proc_waiter (void *arg) if (ISSTATE (myself, PID_NOCLDSTOP)) // FIXME: No need for this flag to be in _pinfo any longer continue; /* Child stopped. Signal myself. */ - si.si_sigval.sival_int = CLD_STOPPED; + si.si_code = CLD_STOPPED; break; case SIGCONT: continue;