Re: [PHP-DEV] Re: Socket Rework Complete

2002-03-08 Thread derick

On 8 Mar 2002, Jason Greene wrote:

> Thanks for the bug report, it will be fixed.

You can merge this fix into the branch if you want to.

Derick

> 
> -Jason
> 
> On Fri, 2002-03-08 at 09:39, J Smith wrote:
> > 
> > I think I see bug number 1...
> > 
> > The system call for select() you to perform an indefinite blocking call if 
> > you pass NULL as tv, but PHP's socket_select() doesn't seem to have that 
> > feature. (It did in previous versions, from sometime in 4.0.7dev and up. I 
> > caught that bug originally, actually.)
> > 
> > The old fix is still a valid one -- if the user doesn't pass arguments sec 
> > and usec, pass NULL as the tv argument to the system select() call. I've 
> > implemented it in last night's snapshot and it seems to work fine. 
> > (Although I'm having a bitch re-writing our sockets stuff -- I have no idea 
> > how to use the arrays yet versus the file descriptors, but I'll report as I 
> > go.)
> > 
> > J
> > 
> > 
> > Jason Greene wrote:
> > 
> > > For all those who don't follow CVS. The sockets extension modifications
> > > I listed out a few weeks ago are complete, and will be included in the
> > > 4.2.0 release.
> > > 
> > > The extension will still be marked as experimental; however, if 4.2.0
> > > goes well, and there are few bugs, perhaps it can be marked as stable by
> > > 4.3.0.
> > > 
> > > I ask all those that use the sockets extension try and get any bug
> > > reports to me before RC1 closes (That way the fixes will make 4.2.0).
> > > Also, between 4.2.0 and 4.3.0 would be a good time frame to suggest
> > > behavior changes because once the extension is marked stable, these will
> > > be a lot tougher to put through.
> > > 
> > > 
> > > Thanks,
> > > 
> > > -Jason
> > > 
> > > 
> > > 
> > 
> > 
> > -- 
> > PHP Development Mailing List 
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> -- 
> Jason T. Greene
> Internet Software Engineer
> 
> <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]> 
> <[EMAIL PROTECTED]>
> 
> Use PHP: http://www.php.net
> 
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--
  PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Site Resource Manager - www.vl-srm.net
---


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: Socket Rework Complete

2002-03-08 Thread Jason Greene

Thanks for the bug report, it will be fixed.

-Jason

On Fri, 2002-03-08 at 09:39, J Smith wrote:
> 
> I think I see bug number 1...
> 
> The system call for select() you to perform an indefinite blocking call if 
> you pass NULL as tv, but PHP's socket_select() doesn't seem to have that 
> feature. (It did in previous versions, from sometime in 4.0.7dev and up. I 
> caught that bug originally, actually.)
> 
> The old fix is still a valid one -- if the user doesn't pass arguments sec 
> and usec, pass NULL as the tv argument to the system select() call. I've 
> implemented it in last night's snapshot and it seems to work fine. 
> (Although I'm having a bitch re-writing our sockets stuff -- I have no idea 
> how to use the arrays yet versus the file descriptors, but I'll report as I 
> go.)
> 
> J
> 
> 
> Jason Greene wrote:
> 
> > For all those who don't follow CVS. The sockets extension modifications
> > I listed out a few weeks ago are complete, and will be included in the
> > 4.2.0 release.
> > 
> > The extension will still be marked as experimental; however, if 4.2.0
> > goes well, and there are few bugs, perhaps it can be marked as stable by
> > 4.3.0.
> > 
> > I ask all those that use the sockets extension try and get any bug
> > reports to me before RC1 closes (That way the fixes will make 4.2.0).
> > Also, between 4.2.0 and 4.3.0 would be a good time frame to suggest
> > behavior changes because once the extension is marked stable, these will
> > be a lot tougher to put through.
> > 
> > 
> > Thanks,
> > 
> > -Jason
> > 
> > 
> > 
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Jason T. Greene
Internet Software Engineer

<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]>

Use PHP: http://www.php.net



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Re: Socket Rework Complete

2002-03-08 Thread J Smith


Slight correction -- the fix is actually something more like this (at least 
currently):

If the user passes "null" for the sec argument, pass NULL to select() for 
tv. I think it would probably be better to handle it with the following 
conditions:

1. if the user passes null for both sec AND usec, pass NULL to select(). 
However, if either are non-null values, set tv.sec and tv.usec accordingly. 
This is to account for the unlikely event where the user wants to determine 
sec and usec dynamically. This way, they can also pass NULL for sec and a 
value for usec and still have the non-blocking call based on usec, while 
passing 0 for sec.

2. if the user passes null for sec and leaves off the usec argument, pass 
NULL to select(). This is sort of how the original worked, but if you 
passed null for sec and a proper value for usec, usec wouldn't be used and 
NULL would still be passed to select(). The above case would handle this, 
as usec could still be used.

3. if the user leaves off both sec and usec, pass NULL to select().

That would seem to be a bit more friendly than the current 4.1.2 behaviour, 
and would account for passing null as sec and a value for usec.

J



J Smith wrote:

> 
> I think I see bug number 1...
> 
> The system call for select() you to perform an indefinite blocking call if
> you pass NULL as tv, but PHP's socket_select() doesn't seem to have that
> feature. (It did in previous versions, from sometime in 4.0.7dev and up. I
> caught that bug originally, actually.)
> 
> The old fix is still a valid one -- if the user doesn't pass arguments sec
> and usec, pass NULL as the tv argument to the system select() call. I've
> implemented it in last night's snapshot and it seems to work fine.
> (Although I'm having a bitch re-writing our sockets stuff -- I have no
> idea how to use the arrays yet versus the file descriptors, but I'll
> report as I go.)
> 
> J
> 


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Re: Socket Rework Complete

2002-03-08 Thread J Smith


I think I see bug number 1...

The system call for select() you to perform an indefinite blocking call if 
you pass NULL as tv, but PHP's socket_select() doesn't seem to have that 
feature. (It did in previous versions, from sometime in 4.0.7dev and up. I 
caught that bug originally, actually.)

The old fix is still a valid one -- if the user doesn't pass arguments sec 
and usec, pass NULL as the tv argument to the system select() call. I've 
implemented it in last night's snapshot and it seems to work fine. 
(Although I'm having a bitch re-writing our sockets stuff -- I have no idea 
how to use the arrays yet versus the file descriptors, but I'll report as I 
go.)

J


Jason Greene wrote:

> For all those who don't follow CVS. The sockets extension modifications
> I listed out a few weeks ago are complete, and will be included in the
> 4.2.0 release.
> 
> The extension will still be marked as experimental; however, if 4.2.0
> goes well, and there are few bugs, perhaps it can be marked as stable by
> 4.3.0.
> 
> I ask all those that use the sockets extension try and get any bug
> reports to me before RC1 closes (That way the fixes will make 4.2.0).
> Also, between 4.2.0 and 4.3.0 would be a good time frame to suggest
> behavior changes because once the extension is marked stable, these will
> be a lot tougher to put through.
> 
> 
> Thanks,
> 
> -Jason
> 
> 
> 


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php