Wierd problem in linux 2.4.18-bf2.4, Java Blackdown-1.4.2-rc1 (Solved)

Achilleus Mantzios achill at matrix.gatewaynet.com
Mon Jun 27 09:27:17 GMT 2005


Forgot my homework....
A classic (lack of) consumption of output situation,

>From the java docs:

 The Runtime.exec methods may not work well for special processes on 
certain native platforms, such as native windowing processes, daemon 
processes, Win16/DOS processes on Microsoft Windows, or shell scripts. The 
created subprocess does not have its own terminal or console. All its 
standard io (i.e. stdin, stdout, stderr) operations will be redirected to 
the parent process through three streams (Process.getOutputStream(), 
Process.getInputStream(), Process.getErrorStream()). The parent process 
uses these streams to feed input to and get output from the subprocess. 
Because some native platforms 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.


Sorry for the noise, the situation can pretty well
occur in FreeBSD too when pipe output buffer reaches its limit, 
and at the end of the day i think someone maybe will find this 
useful in the future. 

-- 
-Achilleus



More information about the freebsd-java mailing list