From: nobu.nokada@... Date: 2002-01-29T18:54:51+09:00 Subject: Re: Open3 (more on thread) Hi, At Tue, 29 Jan 2002 16:11:08 +0900, Amos wrote: > Why the use of Thread? Otherwise the script blocks till the child process exits. If the child waits input from the script, this results deadlock. > I wrote a script that used this open3 to run > another script that ended with 'exit 1'. I then ran this mess like > this: > > while :; do ./runcmd.rb ; done > > Well, sometimes the exception was raised, and sometimes it wasn't. > So I fiddled with it some and came up with this. It also passes the > pipes back so that they can be accessed in the rescue clause. Perhaps, the script might die before the child died. -- Nobu Nakada