tibberous Posted September 3, 2007 Share Posted September 3, 2007 I am trying to run a script and not have my program wait until it is done. I tried: exec("php script.php $_ > /dev/null/ &") And it works, but it keeps printing "sh: /dev/null/: Is a directory". I DON'T CARE THAT IT IS A DIRECTORY! I tried: @exec("php script.php $_ > /dev/null/ &") and @exec("php script.php $_ > /dev/null/ &", $_, $__), those don't work either. Does anyone know how to do this, or why it keeps saying "sh: /dev/null/: Is a directory"? Link to comment https://forums.phpfreaks.com/topic/67772-solved-running-a-process-without-waiting-till-its-finished-linux/ Share on other sites More sharing options...
trq Posted September 3, 2007 Share Posted September 3, 2007 You could try reading this tutorial on forking in php. or why it keeps saying "sh: /dev/null/: Is a directory"? because you should be using /dev/null not /dev/null/ Link to comment https://forums.phpfreaks.com/topic/67772-solved-running-a-process-without-waiting-till-its-finished-linux/#findComment-340449 Share on other sites More sharing options...
tibberous Posted September 3, 2007 Author Share Posted September 3, 2007 I did read that tutorial, just typo'ed it. Thanks a ton! Link to comment https://forums.phpfreaks.com/topic/67772-solved-running-a-process-without-waiting-till-its-finished-linux/#findComment-340484 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.