From abdbf4cf3aa554a7dcba28ab44524f23691c0cc0 Mon Sep 17 00:00:00 2001 From: Jeremiah Orians Date: Mon, 24 Jan 2022 18:45:13 -0500 Subject: [PATCH] Even more debug info for waitpid --- cc_spawn.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cc_spawn.c b/cc_spawn.c index f5a0465..f38025e 100644 --- a/cc_spawn.c +++ b/cc_spawn.c @@ -152,6 +152,15 @@ int what_exit(char* program, int status) * If bit 0x80 of w_status is set, a core dump was produced. * ***********************************************************************************/ + if(DEBUG_LEVEL > 6) + { + fputs("in what_exit with char* program of: ", stderr); + fputs(program, stderr); + fputs("\nAnd int status of: 0x", stderr); + fputs(int2str(status, 16, FALSE), stderr); + fputc('\n', stderr); + } + int WIFEXITED = !(status & 0x7F); int WEXITSTATUS = (status & 0xFF00) >> 8; int WTERMSIG = status & 0x7F;