Bug #75749 [NEW]: pcntl_fork does not duplicate stream_sockets
| From: | michaela dot merz at roillofone dot com | Date: | Sat, 30 Dec 2017 22:46:24 +0000 |
| Subject: | Bug #75749 [NEW]: pcntl_fork does not duplicate stream_sockets | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-213330@lists.php.net to get a copy of this message | ||
From: michaela dot merz at roillofone dot com
Operating system: Linux
PHP version: 7.0.26
Package: Streams related
Bug Type: Bug
Bug description:pcntl_fork does not duplicate stream_sockets
Description:
------------
Process "A" has a number of open network stream sockets and watches
those sockets via stream_select. Some are in "accepted" state (the
connection has been established). Process "A" maintains static
connections (think IRC) itself while http-connections are passed to
pcntl_fork() after being accepted.
Let's say parent process "A" has accepted #23 and #24 . #24 is handled
in a daughter process "B". If "B" exits .. or fclose(#23) is called by
"B" , the resource #23 in "A" is also terminated. According to the (C-)
norm. file descriptors should be copied and closing them in a fork()ed
process should not influence the master process. Same should be valid
for stream resources.
--
Edit bug report at https://bugs.php.net/bug.php?id=75749&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75749&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75749&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75749&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75749&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75749&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75749&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75749&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75749&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75749&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75749&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75749&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75749&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75749&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75749&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75749&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75749&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75749&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75749&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75749&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75749&r=mysqlcfg