There was no debugging info or kernel Oops printed that I could see;
the net connection just hung after Perl had done a brk(). Same
thing happened when I started this from a virtual console.
Vanilla 1.3.17 kernel, Perl 5.001m compiled for a.out.
#!/usr/bin/perl
pipe (CHILDREAD, PARENTWRITE);
pipe (PARENTREAD, CHILDWRITE);
select (CHILDWRITE); $| =3D 1;
$pid =3D fork;
if ($pid > 0) {
close(CHILDWRITE);
close(CHILDREAD);
print PARENTWRITE "A\n"; #send option to child process
while (<PARENTREAD>) {print;} #processing of child's output
print PARENTWRITE "Q\n"; #send quit command to child
return;
} else {
open(STDOUT, ">&CHILDWRITE");
open(STDIN, "<&CHILDREAD");
close(PARENTWRITE);
close(PARENTREAD);
system "trivial";
return;
}
-- =
Thomas K=F6nig, Thomas.Koenig@ciw.uni-karlsruhe.de, ig25@dkauni2.bitnet.
The joy of engineering is to find a straight line on a double
logarithmic diagram.