[Chicago] capturing output from subprocesses

Martin Maney maney at two14.net
Fri Nov 11 21:59:21 CET 2005


On Fri, Nov 11, 2005 at 02:33:06PM -0600, Noel Thomas Taylor wrote:
> Too bad. If I can ask you one more thing: what is the proper purpose of 
> using fcntl to set a file descriptor to non-blocking IO if not to achieve 
> the behavior I'm looking for in this problem?

fcntl affects the behavior of the low-level (system call) interface. 
There may be some buffering there that would need to be addressed, but
I think not, given that you're concerned with writing to a pipe.  The
problem is the higher-level buffering - what's been referred to as
"stdio" buffering.  I don't know if FORTRAN actually uses the clib
routines behind the scenes, but if not there seems to be something
very, very similar in place.  And it is that buffering that you would
need to manipulate - inside the child program.

-- 
Some people hack for fun, some because they want things their way;
some don't because they can't, and some because they can't be bothered.
Some can make anything work, some could but would rather not,
and some would misconfigure a bowling ball.  -- unknown



More information about the Chicago mailing list