Re: does IO.read block?
- From: Michael Malone <michael.malone@xxxxxxxxxx>
- Date: Mon, 16 Mar 2009 15:00:04 -0500
One problem that could hit you is that you might not get theI have set STDOUT.sync = true Is that enough? It should be, because I
concurrency right: you need to make sure that stderr and stdout are
read concurrently (if there can be output on both) because if the pipe
on one of them fills up your child process is blocked. Maybe your
issue lies in that area.
don't have any output originating from the child processes or any child
threads, only the parent/calling thread. But I've been wrong before...
Though I think I have narrowed the problem _very_ slightly. The
thread/process pair that blocks indefinitely blocks on the
read_end.read() call. Which is weird and annoying. My next task will
be to set up some logging to figure out if there should have been an
exception to chuck down the pipe. (In my test case I have a random
amount of jobs, in which every second one raises an exception)
Thanks a lot for your help! It's certainly possible that this is going
to be my "Stupidly Difficult Bug When I Was Near The Beginning Of My
First Programming Job" that everyone seems to have.
Michael
=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================
.
- Follow-Ups:
- Re: does IO.read block?
- From: Robert Klemme
- Re: does IO.read block?
- References:
- does IO.read block?
- From: Michael Malone
- Re: does IO.read block?
- From: Robert Klemme
- Re: does IO.read block?
- From: Michael Malone
- Re: does IO.read block?
- From: Robert Klemme
- does IO.read block?
- Prev by Date: Re: How to get just hour and minute?
- Next by Date: Re: ruby 1.8.8dev stable snapshot?
- Previous by thread: Re: does IO.read block?
- Next by thread: Re: does IO.read block?
- Index(es):
Relevant Pages
|