Deciding between Apache Commons exec or ProcessBuilder

Posted by Moev4 on Stack Overflow See other posts from Stack Overflow or by Moev4
Published on 2010-06-15T19:05:17Z Indexed on 2010/06/15 19:12 UTC
Read the original article Hit count: 536

Filed under:
|
|

I am trying to decide as to whether to use ProcessBuilder or Commons exec, My requirements are that I am simply trying to create a daemon process whose stdout/stdin/stderr I do not care about. In addition I want to execute a kill to destroy this process when the time comes. I am using Java on Linux. I know that both have their pains and pitfalls (such as being sure to use separate thread to swallow streams can lead to blocking or deadlocks, and closing the streams so not to leave open files hanging around)and wanted to know if anyone had suggestions one way or the other as well as any good resources to follow.

© Stack Overflow or respective owner

Related posts about java

Related posts about process