Bug #54501 [NEW]: event_buffer_write from libevent dont work in a forked process
| From: | fireangel_info at yahoo dot com | Date: | Sun, 10 Apr 2011 00:42:19 +0000 |
| Subject: | Bug #54501 [NEW]: event_buffer_write from libevent dont work in a forked process | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-160075@lists.php.net to get a copy of this message | ||
From:
Operating system: Debian-60-squeeze-64-minimal
PHP version: 5.3.6
Package: PCNTL related
Bug Type: Bug
Bug description:event_buffer_write from libevent dont work in a forked process
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.
*/
--
Edit bug report at http://bugs.php.net/bug.php?id=54501&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54501&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54501&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54501&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54501&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54501&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54501&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54501&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54501&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54501&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54501&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54501&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54501&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54501&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54501&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54501&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54501&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54501&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54501&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54501&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54501&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54501&r=mysqlcfg