[kaffe] Pipes kept open after executing subprocesses

Ito Kazumitsu ito.kazumitsu at mail.hidec.co.jp
Mon Jun 7 19:08:04 PDT 2004


In message "Re: [kaffe] Pipes kept open after executing subprocesses"
    on 04/06/08, Ito Kazumitsu <ito.kazumitsu at mail.hidec.co.jp> writes:

> Not only sync_fd but also stdin, stdout and stderr should be
> closed because the application that called the subprocess
> may not have closed them.

> So here is my suggested patch.

>  			synchronized(UNIXProcess.this) {
> +				try_close(raw_stdout);
> +				try_close(raw_stderr);
> +				try_close(stdin_stream);
> +				try_close(sync);
>  				UNIXProcess.this.notifyAll();
>  			}

No!  This may close a stream while the caller application is
still using it.




More information about the kaffe mailing list