please help with fork

2001-10-27 Thread Maxim Goncharov
HI everyone, I need help with understanding what is happening when I fork a process.Here is actual code: #!/usr/bin/perl -w use strict; use Fcntl qw(:DEFAULT :flock); use POSIX; #use Mail::Mailer; my ($pid); $pid = open(HHH,"| infloop"); if($pid){ print HHH "bla bla \n"; } where infloop i

weird forks

2001-10-25 Thread Maxim Goncharov
Hi all, I ran into the problem with forking and I am not able to figure out what happens. Here is the code (let's call the program server): $pid = open(HHH,"|- "); if($pid){ print HHH "something\n"; }else{ exec "client" } Notice that I do not call close(HHH) because I want the parent just t

need help with forking

2001-10-25 Thread Maxim Goncharov
Hi all, I ran into the problem with forking and I am not able to figure out what happens. Here is the code (let's call the program server): $pid = open(HHH,"|- "); if($pid){ print HHH "something\n"; }else{ exec "client" } Notice that I do not call close(HHH) because I want the parent just to

weird problem with forking

2001-10-25 Thread Maxim Goncharov
Hi all, I ran into the problem with forking and I am not able to figure out what happens. Here is the code (let's call the program server): $pid = open(HHH,"|- "); if($pid){ print HHH "something\n"; }else{ exec "client" } Notice that I do not call close(HHH) because I want the parent just t