This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: java.lang.Process.waitFor()


Hi Erik,

>I thought in direction too, but I don't know if I can apply it. I'm starting three
>threads. One feeds input to stdin; the two others capture output from stdout and
>stderr. I shouldn't interfere or block anything until the child process has exited;
>the threads should run inimpeded until then. Would you know how to introduce an
>object here?

You don't need an object. See the JavaDoc for Thread.join().

You seem to be going down the path suggested in this nice article (cf. StreamGobbler):

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html

I prettied this up once, but can't find the code anymore. I think I might have also
added a Thread.join(), but can't remember.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]