09-30-04 01:09 AM
"Somdutt Patnaik" <sdpatzz@rediffmail.com> wrote in message
news:411c6c10.0409110701.6dc39cd7@posting.google.com...
> 1. Select frequently returns an errno which means:"Interrupted system
> call" error.
Yes, if you interrupt it with a signal, it will do that.
> 2. Is select() thread safe?
Yes, provided the structures you pass to and from 'select' are properly
protected.
> 3. Are there any synchronizations issues for Unix Domain sockets?
No, unless you try to change their modes.
> 4. There is often a deadlock in one of the interaction states which
> causes either the client or server to time-out due to nothing returned
> by select().
Then your state machine is broken.
> Finally are there any suggestions for the timeout parameters of the
> client and server select()s?
Sure, timeout as soon as you have something else to do. If you aren't
going to do anything else until you receive a packet, don't time out. If you
are going to do something in 500mS if you don't receive a packet, then time
out in 500mS.
DS
[ Post a follow-up to this message ]
|