Axway-API-Management-Plus / apigw-maven-plugin

Maven plugin for Axway API Gateway/Manager development and deployment.
Apache License 2.0
11 stars 9 forks source link

"process hasn't exited" for long running external command #28

Closed mlookaxw closed 4 years ago

mlookaxw commented 4 years ago

If a long running external command is executed, sometimes a "java.lang.IllegalThreadStateException: process hasn't exited" exception is thrown.

mlookaxw commented 4 years ago

When the exit code of the external command is checked, sometimes the process hasn't terminated yet.

The Process#waitFor() method has to be used instead of Process#exitValue()