Skip to contentSkip to conversation

EINTR

DISCUSSION Folkert van Heusden 2 participants 2 messages Dec 28, 2002 – Dec 30, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

I always thought: you should always check for errno==EINTR when doing read/write/recv/recvfrom/sendto.
But today I heard that when using Linux, EINTR does NEVER occur when doing read/etc. on files.
Is this true?
And also: is this also true for sockets? and recv & friends?

Folkert van Heusden
www.vanheusden.com/Linux

#1 lore raw

Folkert van Heusden, Sun, Dec 29, 2002 00:37:34 +0100:

Quoted 7 lines

Hi,

I always thought: you should always check for errno==EINTR when doing read/write/recv/recvfrom/sendto.
But today I heard that when using Linux, EINTR does NEVER occur when doing read/etc. on files.
Is this true?

It was definitely true for 2.4.9.
Even on NFS mounted files.
What happen if the volumes mounted with intr, btw?

Quoted 1 line

And also: is this also true for sockets? and recv & friends?

No. You _have_to_ check EINTR for sockets, fifos, and pipes.

-alex