On Sun, 15 Mar 2026 22:44:37 GMT, xeu-giayoei <[email protected]> wrote:

> This PR fixes a segfault in the jpackage Linux launcher caused by partial 
> reads/writes when transferring JVM launcher data through a pipe.
> 
> It introduced `readFully` and `writeFully` helper functions in 
> `LinuxLauncher.c` to ensure complete transfer by:
> - Using a `while` loop to handle partial I/O.
> - Retrying on `EINTR`.

Sorry for the delay.

> Can you add a test that triggers the `EINTR` error condition?

I found that I was able to reliably trigger `EINTR` by installing a signal 
handler without the `SA_RESTART` flag, and sending a signal while the process 
is blocked in `read()`/`write()`.

However, it requires modifying the launcher to install such a handler. With 
default signal dispositions, `EINTR` is generally not observed, as the syscall 
would either be restarted or the process would terminate. It seems difficult to 
add a test for `EINTR` with the current launcher code.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/30254#issuecomment-4085331051

Reply via email to