开发者

programe received signal SIGIO

开发者 https://www.devze.com 2023-04-04 14:48 出处:网络
I see following开发者_Python百科 error in my Nginx\'s error.log, [notice] 12451#0: signal 29 (SIGIO) received

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号