Hi,

At Tue, 29 Jan 2002 16:11:08 +0900,
Amos <amos+lists.ruby-talk / utdallas.edu> 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