The Groovy Process Management page mentions that:
Because some native platf开发者_高级运维orms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock
This snippet comes from the JDK API. Which platforms, in particular, are these?
It also happens on Linux and (I expect) Solaris.
In fact, I would be surprised to find any conventional OS platform that provides unlimited buffering for process-to-process streams; i.e. pipes in UNIX terminology.
I know this happens on Windows at least. This is why a child's stdin and stdout must be read in another thread.
精彩评论