diff options
author | Christopher Faylor <me@cgf.cx> | 2005-10-11 18:17:59 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-10-11 18:17:59 +0000 |
commit | a5ac89cbbd9e8b8014d9558709c70d5a1b6326bc (patch) | |
tree | b03bb47b7ca78e1b9be89ece7db07206c9031196 /winsup/utils/strace.cc | |
parent | f2e8d7b0f062b86286b7969d7b7ec1d82ffd4a18 (diff) | |
download | newlib-a5ac89cbbd9e8b8014d9558709c70d5a1b6326bc.zip newlib-a5ac89cbbd9e8b8014d9558709c70d5a1b6326bc.tar.gz newlib-a5ac89cbbd9e8b8014d9558709c70d5a1b6326bc.tar.bz2 |
* Makefile.common (CFLAGS_COMMON): Add -Wstrict-aliasing.
Diffstat (limited to 'winsup/utils/strace.cc')
-rw-r--r-- | winsup/utils/strace.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc index 1bd54ce..f601c44 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc @@ -128,7 +128,7 @@ get_child (DWORD id) } static void -remove_child (DWORD id) +remove_child (FILE *ofile, DWORD id) { child_list *c; if (id == lastid) @@ -138,6 +138,9 @@ remove_child (DWORD id) { child_list *c1 = c->next; c->next = c1->next; + DWORD n = 0xdeadbeef; + GetExitCodeProcess (c1->hproc, &n); + fprintf (ofile, "process %u exited with status %p\n", id, n); free (c1); return; } @@ -627,7 +630,7 @@ proc_child (unsigned mask, FILE *ofile, pid_t pid) break; case EXIT_PROCESS_DEBUG_EVENT: - remove_child (ev.dwProcessId); + remove_child (ofile, ev.dwProcessId); break; case EXCEPTION_DEBUG_EVENT: if (ev.u.Exception.ExceptionRecord.ExceptionCode != |