Linux 实时信号问题 请高手指教

Linux 实时信号问题 请高手指教,第1张

sigset_t mask

sigemptyset(&mask)//清空

sigaddset(&mask, SIGPIPE) //将SIGPIPE加入mask中

int err = 0

if((err = pthread_sigmask(SIG_IGN, &mask, NULL)) != 0) //设置mask的信号,当同时有多个SIGPIPE信号过来的时候,第只有第一个信号生效,其他的做SIG_IGN,就是忽略

{

printf("Ignore singal error\n")

}

else

{

printf("Ignored singal SIGPIPE\n")

}

struct sigaction sa

memset(&sa, 0x00, sizeof(sa)) //清零

sa.sa_handler = SIG_IGN

sigaction( SIGPIPE, &sa, 0 ) //处理SIGPIPE信号,按上一行指定的,也是忽略。

所以整个代码应该是忽略SIGPIPE信号吧

1.申请hotmail邮箱

2.用申请的hotmail邮箱向[email protected]发送邮件,邮件内容如下:

subscribe linux-kernel

3.等待回信,将收到邮件,如下:

Confirmation for subscribe linux-kernel

发件人:Majordomo

时 间:2012年5月10日(星期四) 凌晨0:27 (UTC-05:00 华盛顿、多伦多、古巴、智利)

收件人: [email protected]>

Someone (possibly you) has requested thatyour email address be added

to or deleted from the mailing list"[email protected]".

If you really want this action to be taken,please send the following

commands (exactly as shown) back to"[email protected]":

auth e3622bdd subscribe linux-kernel [email protected]

If you do not want this action to be taken,simply ignore this message

and the request will be disregarded.

If your mailer will not allow you to sendthe entire command as a single

line, you may split it using backslashes,like so:

auth e3622bdd subscribe linux-kernel \

[email protected]

If you have any questions about the policyof the list owner, please

contact"[email protected]".

Thanks!

[email protected]

4.回信,内容如下:

auth e3622bdd subscribe linux-kernel [email protected]

至此,尽情享受每天接收>200封linux内核开发邮件的喜悦吧!


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/7439257.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-05
下一篇 2023-04-05

发表评论

登录后才能评论

评论列表(0条)

保存