Java exec() external process

Status
You're currently viewing only bigmac44's posts. Click here to go back to viewing the entire thread.
Not open for further replies.

bigmac44

Wise, Aged Ars Veteran
103
The external process is trying to write something to stdout that you aren't consuming in the first example. At some point its output buffers fill up and then blocks while trying to write (e.g. in a call to printf()), waiting for you (the parent java process) to free space in the buffer by consuming what it has written. By calling close() on the buffered reader, I would guess that you are closing the stdout stream of the external process. This causes all writes to stdout to fail (and the process most likely isn't checking to see if its writes are actually successful), but prevents any blocking.
 
Status
You're currently viewing only bigmac44's posts. Click here to go back to viewing the entire thread.
Not open for further replies.