Restartable system call behaviour
petefrench at ticketswitch.com
Wed Feb 1 12:48:32 PST 2006
> >>I have a piece of coode which does some networking, in which I see read
> >>and write calls failing with 'Interrupted system call' from time to time.
> > You will get EINTR if the interrupt occurs before any data is read
> > or written.
> Will it also happen with recv() with MSG_WAITALL flag set?
Actually I have narrowed this down now, and I wwas wrong in the original
posting - I was getting the EINTR returned by connect. Now I am not
sure if this is correct behaviour or not - if a signal has SA_RESTART set
then it should restart, but connect returns EINTR and then continues
to connect in the background.
I had alwways belived that if system calls are restrtable then you will never
see EINTR at all. Now I dont know if this is a problem with my understanding
of how the system works, or an actual bug. have filed a pr anyway, just in
case it *is* a bug.
More information about the freebsd-stable