On Fri, Jul 7, 2017 at 10:14 PM, Martijn van Duren <p...@list.imperialat.at> wrote:
> Hello Ferenc, > > On 07/07/17 19:49, Ferenc Kovacs wrote: > > > > > > On Thu, Jul 6, 2017 at 11:12 AM, Martijn van Duren < > p...@list.imperialat.at <mailto:p...@list.imperialat.at>> wrote: > > > > Hello internals@, > > > > I have an (exotic) case where I need to be able to get the > > filedescriptor from a previously opened stream (via > stream_socket_pair) > > to hand over to the child process, which needs to reexecute. > > > > I saw that the php:// wrapper supports php://fd/X syntax, so I reckon > > there should be a way to extract the information as well from a > stream > > as well. Unfortunately I don't seem to be able to find it. > > > > Can someone point me in the right direction? > > > > Sincerely, > > > > Martijn van Duren > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > hi, > > > > would you need something like fildes_fileno() from > https://github.com/Tyrael/php-fildes ? > > I never managed to put that up for pecl, not sure if it even compiles > anymore with recent php versions > > > Thanks for the hint, but I'd like to refrain from external > libraries as much as I can, especially for something simple as > a simple number inside a data structure. > > I might also achieve something like this by eio from pecl, through > e.g. eio_dup2, but it's just unrealistic overkill to ask for a full > extension installation for just 1 one trivial piece of functionality. > > > > -- > > Ferenc Kovács > > @Tyr43l - http://tyrael.hu > sure, I just thought that you are asking for a solution and not proposing a new feature/function to the core. -- Ferenc Kovács @Tyr43l - http://tyrael.hu