You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root problem was that java.lang.UNIXProcess initializes after the user's trap is installed, and it then proceeds to reset SIGCHLD handling to default. According to sigaction man page, default behavior for SIGCHLD is to discard, so we silently lose the trap and the signal.
I have a fix that forces java.lang.Process and java.lang.UNIXProcess to load before setting up the Signal module. That should guarantee the JVM's SIGCHLD handler has been installed and that it will be overwritten by the user's trap.
You do not get a signal when a child process dies, you should get SIGCHLD.
Example, the following code works on MRI (and is differently broken on pre-9k JRuby, where you do get SIGCHLD, but the processed is reaped by Java)
https://gist.github.com/jensnockert/05e03714f57ee04ec2da
The text was updated successfully, but these errors were encountered: