in reply to Re^4: System Function...script does not move until process ends.
in thread System Function...script does not move until process ends.
Note that you'll want to test the db from the parent after you return from the sub.use POSIX ":sys_wait_h"; sub startTheDB { (defined $pid = fork()) or die "Unable to fork!\n"; if ( !$pid ) { exec "StartTheDB" or die "Can't start the db!\n"; } else { do { $kid = waitpid(-1, WNOHANG); } until $kid > 0; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: System Function...script does not move until process ends.
by polettix (Vicar) on Apr 06, 2005 at 18:25 UTC | |
by RazorbladeBidet (Friar) on Apr 06, 2005 at 18:31 UTC | |
by polettix (Vicar) on Apr 07, 2005 at 08:48 UTC |