I am programming a user application for a embedded Linux system, and I am using the common functions such as open, close, read, ioctl, etc. for the devices. Now, I read about EINTR, indicates that the function was interrupted by a signal, but I am not sure about the implications. In all the example programs I have, sometimes it is done, e.g. ioctl(), sometimes it is not done, e.g. read(). So, I am a little bit confused.
When do I preferably check for EINTR and repeat the function call?
See sigaction : http://pubs.opengroup.org/onlinepubs/009695399/functions/sigaction.html
By default, you have the SA_RESTART behavior, so you don't have to worry about EINTR, if you don't play with signals.