php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65293 eio_* functions don't allow to operate on fd/0
Submitted: 2013-07-19 07:21 UTC Modified: 2013-07-19 08:14 UTC
From: bugs dot php dot net at ss dot chernousov dot net Assigned: osmanov (profile)
Status: Closed Package: eio (PECL)
PHP Version: Irrelevant OS:
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: bugs dot php dot net at ss dot chernousov dot net
New email:
PHP Version: OS:

 

 [2013-07-19 07:21 UTC] bugs dot php dot net at ss dot chernousov dot net
Description:
------------
All eio_* functions check if $fd is less than or equal to zero. However, fd/0 is 
usually stdin, but it also can be any other file. There's no reason to prevent eio 
from operating on fd/0.

Test script:
---------------
<?php
echo eio_close(0) ? "closing stdin\n" : "failed to close stdin\n";
echo eio_close(2) ? "closing stderr\n" : "failed to close stderr\n";
eio_event_loop();


Expected result:
----------------
closing stdin
closing stderr


Actual result:
--------------
failed to close stdin
closing stderr


Patches

php_eio.c-fd0.patch (last revision 2013-07-19 07:21 UTC by bugs dot php dot net at ss dot chernousov dot net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-19 08:12 UTC] osmanov@php.net
Automatic comment from SVN on behalf of osmanov
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=330976
Log: Fix: bug #65293 where eio functions failed to process file descriptor equal to 0
 [2013-07-19 08:14 UTC] osmanov@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: osmanov
 [2013-07-19 08:14 UTC] osmanov@php.net
Fixed in release eio-1.2.3.
Thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC