note 48859 added to ref.exec
| From: | sean at Tkeenio-dot-com | Date: | Sun, 09 Jan 2005 19:35:59 +0000 |
| Subject: | note 48859 added to ref.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-83004@lists.php.net to get a copy of this message | ||
Just to clarify, background shell exec()ing is not the same as a fork() under Unix. It would be
useful if PHP supported fork() like Perl and other scripting languages do. Simply exec()'ing a
process and sending it to the background is not the same.
A true fork() copies the current environment and duplicates the running script so that there are two
instances, one child, one parent. The child and parent can determine which copy they are and then
take separate courses of execution paths based on that. Often one copy will perform some "busy
work" while the other returns to normal execution. But no matter what, both functions live
within the same code rather than a separate, external program. exec()ing can not do this for you.
----
Manual Page -- http://www.php.net/manual/en/ref.exec.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48859
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48859&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48859&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48859&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48859&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48859&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48859&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48859&report=yes
Search -- http://master.php.net/manage/user-notes.php