错在哪里?

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能看到有两个进程了!
...全文
154 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
flyby 2000-09-29
  • 打赏
  • 举报
回复
<input type=password size=10>
flyby 2000-09-29
  • 打赏
  • 举报
回复
<input type=password value="ddd">

2,204

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 CGI
社区管理员
  • CGI社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧