output child WEXITSTATUS/WTERMSIG on abnormal termination

jaspers-st
Lauri Tirkkonen 6 years ago committed by terriblephrases
parent 3061ebd7e1
commit e651f31642

@ -738,8 +738,10 @@ sigchld(int a)
if (pid != p) if (pid != p)
return; return;
if (!WIFEXITED(stat) || WEXITSTATUS(stat)) if (WIFEXITED(stat) && WEXITSTATUS(stat))
die("child finished with error '%d'\n", stat); die("child exited with status %d\n", WEXITSTATUS(stat));
else if (WIFSIGNALED(stat))
die("child terminated due to signal %d\n", WTERMSIG(stat));
exit(0); exit(0);
} }

Loading…
Cancel
Save