错在哪里?
Xfly 2000-06-22 03:42:00 #! /usr/bin/perl
pipe(INPUT, OUTPUT);
$retval = fork();
if ($retval != 0) {
# this is the parent process
while(1) {
#close (INPUT);
print ("Enter a line of input:\n");
$line = <STDIN>;
print OUTPUT ($line);
}
} else {
# this is the child process
while(1) {
#close (OUTPUT);
$line = <INPUT>;
print ($line);
print "test\n";
#exit (0);
}
}
子进程好象根本没被执行到???
不过用ps -ef能看到有两个进程了!