External command executions sometimes don't return.
This can be seen in unit tests. Example: org.nuxeo.ecm.platform.convert.tests.TestPDFToImage
Steps to reproduce:
- install ImageMagick but not Ghostscript
- run "mvn test" in nuxeo-platform-convert
-> the process hangs
If you check the command that is run, it's a simple "convert a.tmp b.png".
The same command run manually outputs a (verbose) error message and ends.
Possible analysis:
The external command is run through the CommandLineExecutor, in this case I think it's the ShellExecutor implementation.
The ShellExecutor doesn't read the error stream.
Buffer saturation is known to hang processes on some platform (like Windows in this case): cf. Process java documentation.
-> buffer fills -> process hangs -> waitFor() never returns -> the executor never returns