in reply to Re: Re: Pipe, fork, exec and red-hot pokers.
in thread Pipe, fork, exec and red-hot pokers.

First, I changed 'read' to 'sysread'. But if the program you are exec()ing is this:
#!/usr/bin/perl my $i=0; while (1) { print "stdout " . $i++ . "\n"; sleep 1; }
Then you will find that no output is captured by read. The perl program must set $|=1, which is exactly what I don't want to have to worry about.

--
Ash OS durbatulk, ash OS gimbatul,
Ash OS thrakatulk, agh burzum-ishi krimpatul!
Uzg-Microsoft-ishi amal fauthut burguuli.