Perldoc Search: "$PID" perl-5.20.1

search official POD


7 PODs, 64 LINEs found.
perlipc.pod
49 :         unless (kill(0 => $pid) || $!{EPERM}) {
50 :             warn "$pid looks dead";
78 :             while ( (my $pid = waitpid(-1, WNOHANG)) > 0 ) {
79 :                 delete $children{$pid};
80 :                 cleanup_child($pid, $?);
85 :             my $pid = fork();
86 :             die "cannot fork" unless defined $pid;
87 :             if ($pid == 0) {
91 :                 $children{$pid}=1;
305 :             defined(my $pid = fork())       || die "can't fork: $!";
306 :             exit if $pid;                   # non-zero now means I am the parent
321 :         my $pid;
324 :             $pid = open(KID_TO_WRITE, "|-");
325 :             unless (defined $pid) {
330 :         } until defined $pid;
332 :         if ($pid) {                 # I am the parent 
351 :         my $pid = open(KID_TO_READ, "-|");
352 :         defined($pid)           || die "can't fork: $!";
354 :         if ($pid) {             # parent
369 :         my $pid = open(KID_TO_WRITE, "|-");
370 :         defined($pid)           || die "can't fork: $!";
374 :         if ($pid) {             # parent
389 :         my $pid = open(WRITER, "|-");        # fork open a kid
390 :         defined($pid)               || die "first fork failed: $!";
391 :         if ($pid) {
417 :         $pid = fork();
418 :         defined($pid)               || die "first fork failed: $!";
419 :         if ($pid) {
493 :         $pid = open2(*Reader, *Writer, "cat -un");
513 :         if ($pid = fork()) {
520 :             waitpid($pid, 0);
522 :             die "cannot fork: $!" unless defined $pid;
551 :         if ($pid = fork()) {
557 :             waitpid($pid, 0);
559 :             die "cannot fork: $!" unless defined $pid;
680 :             while ((my $pid = waitpid(-1, WNOHANG)) > 0 && WIFEXITED($?)) {
717 :             my $pid;
718 :             unless (defined($pid = fork())) {
722 :             elsif ($pid) {
723 :                 logmsg "begat $pid";
856 :             my $pid;
857 :             unless (defined($pid = fork())) {
861 :             elsif ($pid) {
862 :                 logmsg "begat $pid";
perlfork.pod
97 :                     my $pid = fork();
98 :                     die "fork() failed: $!" unless defined $pid;
99 :                     if ($pid) {
106 :                     $pid;
126 :                     my $pid = fork();
127 :                     die "fork() failed: $!" unless defined $pid;
128 :                     if ($pid) {
135 :                     $pid;
perltie.pod
45 :                 my $pid = shift || $$; # 0 means me
47 :                 if ($pid !~ /^\d+$/) {
48 :                     carp "Nice::Tie::Scalar got non-numeric pid $pid" if $^W;
52 :                 unless (kill 0, $pid) { # EPERM or ERSCH, no doubt
53 :                     carp "Nice::Tie::Scalar got bad pid $pid: $!" if $^W;
57 :                 return bless \$pid, $class;
perlsec.pod
159 :             die "Can't fork: $!" unless defined($pid = open(KID, "-|"));
160 :             if ($pid) {           # parent
perlport.pod
949 :             "kill()" doesn't have the semantics of "raise()", i.e. it doesn't send a signal to the identified process like it does on Unix platforms. Instead "kill($sig, $pid)" terminates the process identified by $pid, and makes it exit immediately with exit status $sig. As in Unix, if $sig is 0 and the specified process exists, it returns true without actually terminating it. (Win32)
951 :             "kill(-9, $pid)" will terminate the process specified by $pid and recursively all child processes owned by it. This is different from the Unix semantics, where the signal will be delivered to all processes in the same process group as the process specified by $pid. (Win32)
perlfunc.pod
2040 :         If you open a pipe on the command "-" (that is, specify either "|-" or "-|" with the one- or two-argument forms of "open"), an implicit "fork" is done, so "open" returns twice: in the parent process it returns the pid of the child process, and in the child process it returns (a defined) 0. Use "defined($pid)" or "//" to determine whether the open was successful.
perlvar.pod
86 :     $PID
<< Back to Perldoc Search