RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v3]
Volker Simonis
simonis at openjdk.org
Mon May 22 10:22:17 UTC 2023
On Thu, 18 May 2023 05:58:26 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>>
>> REALLY adding the test :)
>
> src/java.base/unix/native/libjava/childproc.c line 413:
>
>> 411: const char* env = getenv("JTREG_JSPAWNHELPER_PROTOCOL_TEST");
>> 412: if (env != NULL && atoi(env) == stage) {
>> 413: printf("posix_spawn:%d\n", child);
>
> I would do an `_exit()` here, not `exit()`, to prevent exit handlers from running. You want to simulate a sudden death. Or a `kill(getpid(), 9);`
>
> Combine this with an explicit `fflush(stdout)` before to get your test output out.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13956#discussion_r1200309154
More information about the core-libs-dev
mailing list