Re: [PECL-DEV] Re: [PECL-BUG] Req #17517 [NEW]: Opening existing file handles

[email protected] (Pierre Joye) Fri, 14 May 2010 19:35:50 +0200
Newsgroups php.pecl.dev
Message-ID <[email protected]>
please do not reply to bug email but use the web interface to post a comment.

On Fri, May 14, 2010 at 4:58 PM, Cyberspice <[email protected]> wrote:
> 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
>> --
>>
>
>
> --
> PECL development discussion Mailing List (http://pecl.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org