Hi Carsten, I guess the documentation is indeed misleading - it is there for 15 years :-)
Maybe it was intended as if (executor.isFailure(exitValue) || watchdog.killedProcess()) { // failed or was killed on purpose by the watchdog } Thanks in advance, Siegfried Goeschl > On 24.04.2020, at 02:15, Carsten Dreesbach <carsten.dreesb...@oracle.com> > wrote: > > I'm a little confused about why the code example > <https://github.com/apache/commons-exec/blob/4055e401ef7e4ad763cc69b892135b449baf0f13/src/main/java/org/apache/commons/exec/ExecuteWatchdog.java#L32-L34> > says to check executor.isFailure(exitValue) to see if the process was killed > by the watchdog. Since the only way that watchdog.killedProcess())could ever > return true, why would the extra exit status be necessary? It seems to me > that just checking watchdog.killedProcess() by itself would be sufficient - > or am I missing something here? > > > Thanks, > > Carsten > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org