I see following开发者_Python百科 error in my Nginx
's error.log,
[notice] 12451#0: signal 29 (SIGIO) received
I want to know in which case does a program receive a SIGIO
?
For asynch signalling code should do these steps.
First you should allow your process receive SIGIO and then your socket or pipe should be put to asynch mode.
Search for these lines in your code
//allow the process to receive SIGIO
fcntl(fd, F_SETOWN, getpid());
and
//Make socket/pipe non-blocking
fcntl(fd, F_SETFL, FASYNC);
or
//Make socket/pipe non-blocking
fcntl(fd, F_SETFL, O_NONBLOCK);
Keywords to search for are : F_SETOWN, FASYNC and O_NONBLOCK
精彩评论