linux - Java ProcessBuilder: Resultant Process Hangs -


I am trying to use the processor of Java to launch an application in Linux, which is "long-term "Should run. The way this program is run is to launch a command (in this case, I'm launching a media playback application), allow it to run, and check to make sure it does not crash . For example, check to see if PID is still active, and then relaunch the process, if it is dead.

The problem I am facing now is that the PID is alive in the system but the GUI for the application is hanging. I tried to change the Processor Builder (CMD) into a different thread, but It's not solving anything, because I expected it would be.

The result of this is that the user appears to crash the program, but kills the Java process driving the process process. The start () process allows the process actually created to resume its normal behavior. This means that the Java application has interference with some vain process, but I do not know at all what's at this point. (That's why I tried to isolate it in another thread, which did not seem to solve anything)

If anyone has any input / idea, please tell me, because I Can not do it for my life Think about solving this problem.

EDIT: I have no worries over the I / O stream created from the process, and no steps have been taken to tackle this way - this process itself?

If the process writes stderr or stdout, and you are not reading it - it just hangs " "Will block, while typing in stdout / err, either merge with / redirect / reorderErrorStream (true) by using a shell / dev / null and span another thread reading process stdout


Comments