in reply to Re: Re: getting a child's process ID
in thread getting a child's process ID
Looks to me like that should work as you want. Here's what I did to test it out:
#!/usr/bin/perl -w # parent.pl use strict; if (my $pid = fork) { print "parent: child pid is $pid\n"; } else { exec('./child.pl'); } #!/usr/bin/perl -w # child.pl use strict; print "Child: pid is $$\n";
And the output I got was:
--parent: child pid is 26534 Child: pid is 26534
"The first rule of Perl club is you don't talk about Perl club."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: getting a child's process ID
by Seshouan (Acolyte) on Oct 19, 2001 at 22:33 UTC |