Help for this page

Select Code to Download


  1. or download this
    FORK: {
        if ($pid = fork) {
    ...
          die "Can't fork: $!\n";
        }
      }
    
  2. or download this
      if (open(TO, "|-")) {
        print TO $fromparent;
    ...
        #Do whatever with $child
        exit;
      };
    
  3. or download this
    pipe(FROM_PARENT, TO_CHILD) or die "pipe: $!";
    select((select(TO_CHILD), $| = 1))[0]);