Another point of view re sys_select behavior.

Ron Alexander rcalex at home.com
Wed May 10 18:16:20 GMT 2000


We use the Book "Advanced Programming in the UNIX Environment" by W. Richard
Stevens as our reference.

On page 399 of Stevens the last para. deals with the select situation.
As usual, there are 2 behaviors for timeout. 4.3+BSD does NOT change the
desc. set while SVR4 clears the set.
The VOS implementation is the BSD version. Samba assumes SVR4 behavior.
The patch that David supplied is ok, but only deals with one caller of
sys_select.
The real fix must be made in system.c.
The question then is if the Samba sys_select should be BSD or SVR4 style.
The simple fix is to adopt SVR4 since clearing the fd's is less overhead
than restoring them.
See client.c wait_keyboard for another example of code that will fail.

I apologize in advance if I have misunderstood, made an error etc. since I
put this together in a rush.

Regards,
Ron



More information about the samba-technical mailing list