php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59705 event_buffer_write from libevent dont work in a forked process
Submitted: 2011-04-10 11:51 UTC Modified: 2017-10-24 04:46 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: fireangel_info at yahoo dot com Assigned:
Status: Suspended Package: libevent (PECL)
PHP Version: 5.3.5 OS: Debian-60-squeeze-64-minimal
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-04-10 11:51 UTC] fireangel_info at yahoo dot com
Description:
------------
// event_buffer_write($buffer,'asdawdasd'); <== here it will send the
'asdawdasd'
  $pid = pcntl_fork();
    switch ($pid) {
    case -1: // Error
        die('Fork failed');
        break;
    case 0: // Child
       
        $thispid=posix_getpid();
     
       event_buffer_write($buffer,'asdawdasd');// $buffer is a valid
connection/ <== here it will NOT send the 'asdawdasd'
   


   
     posix_kill($thispid, 9);
        break;
      }

/*
$buffer resource is transmited to the child but event_buffer_write wont
run.
*/


Actually I'm running 5.3.6

Actual result:
--------------
it should send 'asdawdasd'

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-05 19:50 UTC] krakjoe@php.net
-Assigned To: +Assigned To: osmanov
 [2013-08-06 11:58 UTC] osmanov@php.net
-Assigned To: osmanov +Assigned To: tony2001
 [2013-08-06 11:58 UTC] osmanov@php.net
Again and again, "libevent" is not my extension :) Here is my version: 
http://pecl.php.net/package/event
 [2017-10-24 04:46 UTC] kalle@php.net
-Status: Assigned +Status: Suspended -Assigned To: tony2001 +Assigned To:
 [2017-10-24 04:46 UTC] kalle@php.net
I'm gonna close this as the libevent package on PECL had no had a release for 4 years, and there haven't really been much acitivity since. If development picks back up then this report should be re-opened
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC