I have a program reading in from a file, doin some work on the input, then outputing it to a socket. It’s been running fine for over a month when suddenly I started to get error 11 (EAGAIN?) error that kill the program. When I start 32 instances of the program more then half die within a few minutes receiving EAGAIN messages. I never set the file as non-blocking and besides which how would an input file block, the data is always there isn’t it? The only change i made to this code was to disable the sigpipe signal to avoid the program dieing when it’s socket connection is lost.
Forgive me for not posting code, but I can’t copy and paste and the code is sort of spread out anyways. It’s really as simple as opening a file on one line and calling readline(file, inputString) later on though.
Thanks.
EAGAIN means that the read has been interrupted by a signal and that it should be restarted.
I assume it is the SIGPIPE which used to directly kill your programs and now is handled (even if the handling is to do nothing).