Re: [PHP-DEV] Getting fd from stream

2017-07-08 Thread Ferenc Kovacs
On Sat, Jul 8, 2017 at 8:49 AM, Martijn van Duren wrote: > On 07/08/17 00:47, Sara Golemon wrote: > > On Fri, Jul 7, 2017 at 6:14 PM, Sara Golemon wrote: > >> On Fri, Jul 7, 2017 at 4:06 PM, Martijn van Duren > >> wrote: > >>> blah blah blah > >>> > >> Ignoring the brokenness of your design, th

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Martijn van Duren
On 07/08/17 00:47, Sara Golemon wrote: > On Fri, Jul 7, 2017 at 6:14 PM, Sara Golemon wrote: >> On Fri, Jul 7, 2017 at 4:06 PM, Martijn van Duren >> wrote: >>> blah blah blah >>> >> Ignoring the brokenness of your design, the original ask: Exposing the >> underlying FD from a file stream? Sure.

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Sara Golemon
On Fri, Jul 7, 2017 at 6:14 PM, Sara Golemon wrote: > On Fri, Jul 7, 2017 at 4:06 PM, Martijn van Duren > wrote: >> blah blah blah >> > Ignoring the brokenness of your design, the original ask: Exposing the > underlying FD from a file stream? Sure. No particular objection to > it, and the stream

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Sara Golemon
On Fri, Jul 7, 2017 at 4:06 PM, Martijn van Duren wrote: > blah blah blah > Ignoring the brokenness of your design, the original ask: Exposing the underlying FD from a file stream? Sure. No particular objection to it, and the stream::set_option interface has the right mechanism to surface it in a

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Ferenc Kovacs
On Fri, Jul 7, 2017 at 10:14 PM, Martijn van Duren 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 > wrote: > > > > Hello internals@, > > > > I hav

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Martijn van Duren
Hello Ferenc, On 07/07/17 19:49, Ferenc Kovacs wrote: > > > On Thu, Jul 6, 2017 at 11:12 AM, Martijn van Duren > wrote: > > Hello internals@, > > I have an (exotic) case where I need to be able to get the > filedescriptor from a previously opened st

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Martijn van Duren
On 07/07/17 18:03, Sara Golemon wrote >> The point is, regardless of unix - or tcp sockets, they still have an >> underlying file descriptor, which I need to specify to the child, so >> that they can start using it. Ergo, I need to find a way to export this >> from the stream into PHP. >> > You mis

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Ferenc Kovacs
On Thu, Jul 6, 2017 at 11:12 AM, Martijn van Duren 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

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Sara Golemon
On Fri, Jul 7, 2017 at 11:04 AM, Martijn van Duren wrote: > On 07/07/17 16:38, Sara Golemon wrote: > Yes, although tcp/ip are also possible with stream_socket_pair. > nit; socket_pair sockets are not AF_INET, they're just sockets. > The point is, regardless of unix - or tcp sockets, they still ha

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Martijn van Duren
On 07/07/17 16:38, Sara Golemon wrote: > On Fri, Jul 7, 2017 at 10:04 AM, Martijn van Duren > wrote: >> My use case is to set up a cluster of processes each with their own task >> and permission sets. These processes need to be able to communicate with >> each other over socket pairs, not just bet

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Sara Golemon
On Fri, Jul 7, 2017 at 10:04 AM, Martijn van Duren wrote: > My use case is to set up a cluster of processes each with their own task > and permission sets. These processes need to be able to communicate with > each other over socket pairs, not just between the parent and the child, > but also betw

Re: [PHP-DEV] Getting fd from stream

2017-07-07 Thread Martijn van Duren
On 07/06/17 20:01, Niklas Keller wrote: >> >> On Thu, Jul 6, 2017 at 10:53 AM, Kalle Sommer Nielsen >> wrote: >>> 2017-07-06 11:12 GMT+02:00 Martijn van Duren : I have an (exotic) case where I need to be able to get the filedescriptor from a previously opened stream (via stream_socket_pa

Re: [PHP-DEV] Getting fd from stream

2017-07-06 Thread Niklas Keller
> > On Thu, Jul 6, 2017 at 10:53 AM, Kalle Sommer Nielsen > wrote: > > 2017-07-06 11:12 GMT+02:00 Martijn van Duren : > >> 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,

Re: [PHP-DEV] Getting fd from stream

2017-07-06 Thread Sara Golemon
On Thu, Jul 6, 2017 at 10:53 AM, Kalle Sommer Nielsen wrote: > 2017-07-06 11:12 GMT+02:00 Martijn van Duren : >> 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 t

Re: [PHP-DEV] Getting fd from stream

2017-07-06 Thread Kalle Sommer Nielsen
Hi Martijn 2017-07-06 11:12 GMT+02:00 Martijn van Duren : > 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