php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54501 event_buffer_write from libevent dont work in a forked process
Submitted: 2011-04-10 02:42 UTC Modified: 2011-04-11 13:11 UTC
From: fireangel_info at yahoo dot com Assigned:
Status: Not a bug Package: PCNTL related
PHP Version: 5.3.6 OS: Debian-60-squeeze-64-minimal
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fireangel_info at yahoo dot com
New email:
PHP Version: OS:

 

 [2011-04-10 02:42 UTC] fireangel_info at yahoo dot com
Description:
------------
---
From manual page: http://www.php.net/function.event-buffer-write#Return Values
---

// 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.
*/


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-11 13:11 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2011-04-11 13:11 UTC] aharvey@php.net
Please report bugs in PECL packages on the PECL bug tracker; in this case, at http://pecl.php.net/bugs/report.php?package=event
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC