Re: Forking and BG processes in PHP
| From: | Yasuo Ohgaki | Date: | Fri, 09 Nov 2001 04:24:15 +0000 |
| Subject: | Re: Forking and BG processes in PHP | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73990@lists.php.net to get a copy of this message | ||
Massimiliano Bariola wrote:
Hello Yasuo, Tuesday, November 06, 2001, 12:12:59 PM, you wrote: YO> *SNIP* YO> Try to redirect stdout & stderr to /dev/null (If you are on Unix YO> like systems) YO> Then it will return immediately to PHP. YO> -- YO> Yasuo Ohgaki Sorry Yasuo, but I don't understand well what you mean. Can you clarify? thank youFor example system('/usr/bin/find / -name "core" > /dev/null 2>&1 &'); if you would like to take a look at output system('/usr/bin/find / -name "core" > /tmp/corefiles 2>&1 &'); 'find / -name "core"' should take some time, but system() will return immediately when you redirect stdout/stderr to files and put the command background. -- Yasuo Ohgaki _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com