note 54047 added to function.proc-open
| From: | mib at post dot com | Date: | Wed, 22 Jun 2005 01:21:19 +0000 |
| Subject: | note 54047 added to function.proc-open | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90771@lists.php.net to get a copy of this message | ||
I thought it was highly not recommended to fork from your web server?
Apart from that, one caveat is that the child process inherits anything that is preserved over fork
from the parent (apart from the file descriptors which are explicitly closed).
Importantly, it inherits the signal handling setup, which at least with apache means that SIGPIPE is
ignored. Child processes that expect SIGPIPE to kill them in order to get sensible pipe handling
and not go into a tight write loop will have problems unless they reset SIGPIPE themselves.
Similar caveats probably apply to other signals like SIGHUP, SIGINT, etc.
Other things preserved over fork include shared memory segments, umask and rlimits.
----
Manual Page -- http://www.php.net/manual/en/function.proc-open.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54047
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54047&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54047&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54047&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54047&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54047&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54047&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54047&report=yes
Search -- http://master.php.net/manage/user-notes.php