php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75749 pcntl_fork does not duplicate stream_sockets
Submitted: 2017-12-30 22:46 UTC Modified: 2017-12-30 23:13 UTC
From: michaela dot merz at roillofone dot com Assigned:
Status: Open Package: Streams related
PHP Version: 7.0.26 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: michaela dot merz at roillofone dot com
New email:
PHP Version: OS:

 

 [2017-12-30 22:46 UTC] michaela dot merz at roillofone dot com
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.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-30 23:13 UTC] fmargaine@php.net
Hi,

Could you provide a reproducible test case?
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 12 09:01:31 2019 UTC