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 abou
I had a similar problem when waiting for input from a named pipe with read().
I found an explanation and a useful macro for primitives in GNU libc documentation: TEMP_FAILURE_RETRY
Example:
TEMP_FAILURE_RETRY (read_return = read((int)example_fifo, buffer, (size_t)n));
if (read_return==-1){
fprintf(stderr, "reader.c: read_fifo: read(): %s \n", strerror(errno));
fflush(stderr);
}