Help for this page

Select Code to Download


  1. or download this
    my $pid;
    if (($pid = fork()) == 0) {
    ...
    # dosomething with $pid...
    my $is_alive = kill 0, $pid;  # see if still alive
    kill 15, $pid;                # send a SIGTERM
    
  2. or download this
    my $pid = open(FH,"process @args |"); # to read from it
    my $pid = open(FH,"| process @args"); # to write to it