Commit 076f2aa0 authored by Shashi Guruprasad's avatar Shashi Guruprasad

decoded the raw waitpid status using W* macros in sys/wait.h and report it in

the log. Now we know if tmcd exited using an exit() call or by a signal
parent 0cbb2fdb
......@@ -380,7 +380,11 @@ main(int argc, char **argv)
errorc("waitpid failed");
continue;
}
error("server %d exited with status 0x%x!\n", pid, status);
if( WIFSIGNALED(status) ) {
error("server %d exited with signal %d!\n", pid, WTERMSIG(status));
} else if( WIFEXITED(status) ) {
error("server %d exited with status %d!\n", pid, WEXITSTATUS(status));
}
numchildren--;
for (i = 0; i < (sizeof(foo)/sizeof(int)); i++) {
if (foo[i] == pid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment