Re: Req #17517 [NEW]: Opening existing file handles

From: Date: Fri, 14 May 2010 14:58:30 +0000
Subject: Re: Req #17517 [NEW]: Opening existing file handles
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-7229@lists.php.net to get a copy of this message
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 > -- >

« previous php.pecl.dev (#7229) next »