Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-30 Thread chrisv
On Thu, 29 Mar 2001, Lars Torben Wilson wrote: Zeev Suraski writes: Note that the situation isn't as bad as you thought - it's not that it's not using the resource mechanism. It is, if it wasn't, we'd be getting loads of complaints from people running out of descriptors very

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-30 Thread Zeev Suraski
At 20:11 30/3/2001, [EMAIL PROTECTED] wrote: I'm currently updating my CVS tree so I can update the current source with something to make sure that stuff opened here is closed at the end of it. For this, I'm not too fond of going the resource route for it, simply because I know people are more

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-29 Thread Andi Gutmans
Why do you need to rely on such behavior? Are you trying to do something naught? :) I think in general it's not a good idea to rely on the value and type of resources (even though this is an integer). I'm not quite sure why it returns integers and not resources. Looks like a bad thing to me as

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-29 Thread Andi Gutmans
Lars, I understand what you're saying but there is one important problem with the current implementation which I think outweighs everything else. The fact that right now you are likely to leak file descriptors. This is very bad especially as Apache processes live for many requests. If the

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-29 Thread Zeev Suraski
Note that the situation isn't as bad as you thought - it's not that it's not using the resource mechanism. It is, if it wasn't, we'd be getting loads of complaints from people running out of descriptors very quickly. It just uses old, PHP 3 style resources, of type IS_LONG. They're still

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-29 Thread Andi Gutmans
At 03:35 PM 3/29/2001 +0200, Zeev Suraski wrote: Note that the situation isn't as bad as you thought - it's not that it's not using the resource mechanism. It is, if it wasn't, we'd be getting loads of complaints from people running out of descriptors very quickly. It just uses old, PHP 3

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-29 Thread Andi Gutmans
At 03:47 PM 3/29/2001 +0200, Zeev Suraski wrote: At 15:41 29/3/2001, Andi Gutmans wrote: At 03:35 PM 3/29/2001 +0200, Zeev Suraski wrote: Note that the situation isn't as bad as you thought - it's not that it's not using the resource mechanism. It is, if it wasn't, we'd be getting loads of

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-29 Thread Zeev Suraski
ext/sockets does indeed appear to be broken; It doesn't obey the standard PHP return value rules at all (errors are negative numbers instead of false, resource are passed back as-is instead of as resources). I was actually looking at the other socket functions, fsockopen() and friends.

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-29 Thread Lars Torben Wilson
Zeev Suraski writes: Note that the situation isn't as bad as you thought - it's not that it's not using the resource mechanism. It is, if it wasn't, we'd be getting loads of complaints from people running out of descriptors very quickly. It just uses old, PHP 3 style resources, of type

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-29 Thread Lars Torben Wilson
Zeev Suraski writes: ext/sockets does indeed appear to be broken; It doesn't obey the standard PHP return value rules at all (errors are negative numbers instead of false, resource are passed back as-is instead of as resources). I was actually looking at the other socket functions,

Re: [PHP-DEV] Question about socket ext. file descriptors

2001-03-29 Thread Lars Torben Wilson
Andi Gutmans writes: At 12:44 PM 3/29/2001 -0800, Lars Torben Wilson wrote: Slightly different topic--is it a problem that call-time pass-by-ref is being deprecated but several functions require it in order to work? It is possible. Functions which require their argument by reference