I've got a PHP script that needs to invoke a shell script but doesn't care at all about the output. The shell script makes a number of SOAP calls and is slow to complete, so I don't want to slow down the PHP request while it waits for a reply. In fact, the PHP request should be able to exit without terminating the shell process.
I've looked into the various exec()
, shell_exec()
, pcntl_fork()
, etc. functions, but none of them seem to offer exactly what I want. (Or, if they do, it's not clear to me how.) Any suggestions?
nice
andionice
to prevent the shell script from overwhelming your system (e.g./usr/bin/ionice -c3 /usr/bin/nice -n19
) – Medalist