8226242 : Diagnostic output for posix_spawn failure
Roger Riggs
Roger.Riggs at oracle.com
Mon Jun 17 20:00:29 UTC 2019
Hi,
Updated:
http://cr.openjdk.java.net/~rriggs/webrev-spawn-diag-8225192-3/
On 6/17/19 2:20 PM, Martin Buchholz wrote:
>
>
> On Mon, Jun 17, 2019 at 10:47 AM Thomas Stüfe <thomas.stuefe at gmail.com
> <mailto: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.
>
I separated the causes, both exits are abnormal since the exec didn't'
do what was expected.
Only an exit status of 0 is 'normal' and in this case, that is not what
expected.
Regards, Roger
>
>
> 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