in reply to launching external program with SYSTEM causes script to hang until program closed
See perlipc for details, and the perlfunc section on fork for a brief description. A simple example:
my $child_pid = fork(); if ( ! defined( $child_pid )) { warn "fork failed\n"; } elsif ( $child_pid == 0 ) { # true for the child process exec( $cmd, @args ); } # the parent gets here when the fork succeeds...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: launching external program with SYSTEM causes script to hang until program closed
by erroneousBollock (Curate) on Sep 27, 2007 at 03:19 UTC | |
by tye (Sage) on Sep 27, 2007 at 04:12 UTC | |
|
Re^2: launching external program with SYSTEM causes script to hang until program closed
by perlofwisdom (Pilgrim) on Sep 27, 2007 at 15:13 UTC |