From: ara.t.howard@... Date: 2006-01-31T05:23:09+09:00 Subject: Re: IO.popen hangs reading an empty pipe? On Tue, 31 Jan 2006, Payton Swick wrote: > Ah. You're right, of course. I could have sworn that I tried using > pipe.close_write before and the problem remained, but apparently I was > mistaken. > > Notes: > - "cat" was just to prove a point - the real issue was with "sendmail", but > it seems to have the same solution. My brief overview made me think session > was not suited for sendmail, but perhaps I was wrong about that too? I'll > check it out. you can do anything with session that bash can do - not sure if it'll work for sendmail or not. should work anywhere you are dealing with stdin/out/err. > - the use of timeout was just to allow the test to exit when the hang > occurred. I didn't realize it fails on w32. Is it Timeout that fails, or > just when timeout is combined with IO reads? i may have mispoke - you may be able to use a thread and timeout - but it very easy to block an entire process with io and threads in win... fyi. cheers. -a -- sleep is the best meditation. -- h.h. the 14th dali lama