On Mon, Jun 17, 2019 at 10:47 AM Thomas Stüfe <thomas.stu...@gmail.com> wrote:
> Hi Roger, > > I think this is fine. > > Could you please also print out WIFEXITED and WIFSIGNALLED? Since I am not > sure if the WEXITSTATUS contains valid info if WIFEXITED is 0, or just > random noise. Same for WTERMSIG. > > Alternatively: > if (WIFEXITED) print("exited normaly with %d", WEXITSTATUS) > else if (WIFSTOPPED) print("terminated with signal %d", WTERMSIG) > thanks for doing this. I also think it's best to have different detail messages for normal termination and death by signal, as some shells do. I might put the exception throwing code into a separate function.