RFR: 8342807: Update links in java.base to use https:// [v3]
Thomas Stuefe
stuefe at openjdk.org
Tue Jan 21 06:54:35 UTC 2025
On Mon, 20 Jan 2025 19:34:53 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> In ProcessImpl_md.c, we have adopted the Posix APIs and semantics for process handling.
>> I suggest removing the "unofficial" link, it does not include useful information at this point and is fragile.
>>
>> The current behavior always setting SIGCHLD to SIG_DFL is/has been reliable and does not depend on the behavior of the parent process. (Good)
>> @tstuefe May also be interested in reviewing this change.
>>
>> The previous sentence mentions Solaris and that should be removed at some point but out of scope for this PR.
>
>> In ProcessImpl_md.c, we have adopted the Posix APIs and semantics for process handling. I suggest removing the "unofficial" link, it does not include useful information at this point and is fragile.
>>
>> The current behavior always setting SIGCHLD to SIG_DFL is/has been reliable and does not depend on the behavior of the parent process. (Good) @tstuefe May also be interested in reviewing this change.
>
> https://pubs.opengroup.org/onlinepubs/9799919799/ seems to indicate that the "default action is to ignore the signal", which is unclear to me. I think it means that the signal will not cause invocation of a user handler or abort the process, but does this also mean that wait and waited won't work?
>
> In any case, I agree with @RogerRiggs that keeping this behavior is fine.
>
>>
>> The previous sentence mentions Solaris and that should be removed at some point but out of scope for this PR.
> @tstuefe And you also agree that the link should be removed? (Which is what this PR is about)
The 20+ years old link to the PASC error report I would probably remove; it is likely outdated now. If one wanted to invest the time, one could test the current behavior on our supported Unices. As long as that is not done, we can live with setting SIG_DFL manually.
I would replace it with a link to https://pubs.opengroup.org/onlinepubs/007904875/functions/wait.html and point to the section that says:
[XSI] [Option Start] If the calling process has SA_NOCLDWAIT set or has SIGCHLD set to SIG_IGN,
and the process has no unwaited-for children that were transformed into zombie processes,
the calling thread shall block until all of the children of the process containing
the calling thread terminate, and wait() and waitpid() shall fail and
set errno to [ECHILD]. [Option End]
Again, that is XSI though; I am not sure which of our Unices comply to that. Linux does only partially, so one would have to test that behavior.
Another question @RogerRiggs , I was surprised to see that we set the SIGCHLD default behavior only at Java_java_lang_ProcessImpl_init. Should we also set it in jspawnhelper before the exec? But I guess the assumption is that no java process will fork before Java_java_lang_ProcessImpl_init, so maybe its okay.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21633#issuecomment-2603796226
More information about the net-dev
mailing list