php.net |  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
Description:
------------
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 
process)

Link: http://helemik.cz/juzna/opensource/php/dio.patch

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");


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-25 10:39 UTC] cyberspice@php.net
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 
equivalents.
 [2010-05-26 02:46 UTC] juzna dot cz at gmail dot com
Yes, that name seems great.
 [2016-12-13 07:04 UTC] remi@php.net
-Status: Open +Status: Feedback
 [2016-12-13 07:04 UTC] remi@php.net
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-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 16 17:03:37 2021 UTC