I've got a program with a specialized Process
-type class which handles executing the processes natively on Linux.
It does not use Java's Process class at all, because it needs to do some special handling of the process. Because of this, it also installs its own signal handler for SIGCHLD
, so that it knows when a process exits.
However, I just added a Runtime.exec()
call in my code, which apparently installs its own signal handler for SIGCHLD
, which means that I never get a SIGCHLD
again, which is bad. I've followed the signal-chaining instructions from oracle, but the same problem happens, I never get a SIGCHLD
.
So, the basic question is this: is it possible to chain SIGCHLD
in Java?
LD_PRELOAD
; I haven't tried making an application which embeds the JVM. – Dedicated-Xrs
option to java ? – Mckie