EAGAIN with read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I had a basic question about read . I have a file descriptor marked
with non blocking I/O , and I want to read data from the file
descriptor. This file descriptor is the read end of a UNIX pipe.

 The process that the pipe reads from is a very slow process. Hence I
need to poll  and keep on trying to read from the fd until the process
has actually written something to the pipe. I execute read while the
errno condition EAGAIN is true. Will this ever result in an infinite
loop ? (lets say the remote process dies and doesnt write anything to
the pipe, will I go into an infinite loop since I am polling while
EAGAIN is true ?).

Any help is appreciated. Thank you.

-- S
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux