Help for this page

Select Code to Download


  1. or download this
    my $child = fork;
    if ($child) {
    ...
      # Run the background program
      exec '/path/to/program > /dev/null 2>&1';
    }
    
  2. or download this
    my $pid = open my $cmdfh, "-|", '/path/to/program'
        or die "Cannot fork: $!\n";
    ...
    }
    
    kill 9, $pid;