Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
      print "child believes it is: $$\n";
      exec( $cmd ) # replaces child with a new perl: pid shouldn't change,
    + right?
    }
    
  2. or download this
       parent: pre-fork id 27516
       child believes it is: 27517
    ...
       parent: still here, with id 27516
       parent: sees processes...
       27516 pts/1    R+     0:00 /usr/bin/perl /home/doom/bin/testes-fork
    +itude
    
  3. or download this
       parent: pre-fork id 7253
       child believes it is: 7254
    ...
       parent: sees processes...
       7253 pts/3    S+     0:00 /usr/bin/perl /home/doom/bin/testes-forki
    +tude
       7254 pts/3    Z+     0:00 [perl] <defunct>