Re: [PECL-BUG] Req #17517 [NEW]: Opening existing file handles
[email protected] (Cyberspice) Fri, 14 May 2010 15:58:30 +0100
| Newsgroups | php.pecl.dev |
|---|---|
| Message-ID | <[email protected]> |
Hi,
That's a nice addition. Strictly the dio_ functionality is not being extended but I think we can add this change. However I would like to change the name. I would like to call it dio_fdopen() which is consistent with the UNIX equivalent rather than just dio_get(). However if you'd like to send me the patch I can make the changes and update the release.
Also do you have a test case?
Thanks
Melanie
On 13 May 2010, at 20:17, juzna dot cz at gmail dot com wrote:
> From: juzna dot cz at gmail dot com
> Operating system: Linux
> Package version: SVN
> PHP version: 5.3.1
> Package: dio
> Bug Type: Feature/Change Request
> Bug description: Opening existing file handles
>
> 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");
>
>
> --
> Edit bug report at http://pecl.php.net/bugs/bug.php?id=17517&edit=1
> --
>