|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59212 Opening existing file handles
Submitted: 2010-05-13 15:17 UTC Modified: 2016-12-25 04:22 UTC
From: juzna dot cz at gmail dot com Assigned:
Status: No Feedback Package: dio (PECL)
PHP Version: 5.3.1 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-05-13 15:17 UTC] juzna dot cz at gmail dot com
I've implemented function dio_get(int fd), which will make 
resource from existing file descriptor, when you can't access 
file thru filename (e.g. you need to access existing pipe to 


Reproduce code:
// Parent process
$descriptorspec = array(
  0 => ...
  1 => ...
  2 => ...
  3 => array("pipe", "w"),
proc_open($cmd, ....)

// Child process:
$fp = dio_get(3);
dio_write("Hello parent\n");


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-25 10:39 UTC]
That's a nice idea.  Except I would rather call the function 
dio_fdopen() (kind of like the *NIX fdopen) for consistency 
since all the dio_ functions are named after the *NIX 
 [2010-05-26 02:46 UTC] juzna dot cz at gmail dot com
Yes, that name seems great.
 [2016-12-13 07:04 UTC]
-Status: Open +Status: Feedback
 [2016-12-13 07:04 UTC]
Does this still exists with latest 0.0.8 ?
 [2016-12-25 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Aug 07 20:05:45 2022 UTC