8226242 : Diagnostic output for posix_spawn failure

Martin Buchholz martinrb at google.com
Mon Jun 17 18:20:01 UTC 2019


On Mon, Jun 17, 2019 at 10:47 AM Thomas Stüfe <thomas.stuefe at 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.


More information about the core-libs-dev mailing list