is that perl will decide that there is probably (possibly) output to be returned by the sub-shell, and since the backticks are being used to "capture" the output for use by the script, it has to wait for the process to finish, even though the shell is being backgrounded.print `sh /root/scripts/security.sh&`;
The way around that is to run the script in such a way that perl will not decide that it needs to wait for the process to finish so it can capture the output. Either of the following two alternatives would do:
`sh /some/job.sh >/dev/null &`;
$exit_status = system( "/some/job.sh &" );
In reply to Re: Executing a program or series of programs in perl.
by graff
in thread Executing a program or series of programs in perl.
by mikey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |