文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>线程-信号

线程-信号

时间:2009-04-17  来源:zhengwenwei_123

Each thread has its own signal mask, but the signal disposition is shared by all threads in the process. This means that individual threads can block signals, but when a thread modifies the action associated with a given signal, all threads share the action. Thus, if one thread chooses to ignore a given signal, another thread can undo that choice by restoring the default disposition or installing a signal handler for the signal.
你可以为每个线程设置它的掩码,但是由于signal disposition是共享的,也就是说你无法为一个线程安装自己的信号处理函数。

#include <signal.h>

int pthread_sigmask(int how, const sigset_t
 *restrict set,
                    sigset_t *restrict oset); 
Returns: 0 if OK, error number on failure


A thread can wait for one or more signals to occur by calling sigwait.

相关阅读 更多 +
排行榜 更多 +
超凡先锋网易正版手游

超凡先锋网易正版手游

飞行射击 下载
超凡先锋测试版(badlanders)

超凡先锋测试版(badlanders)

飞行射击 下载
2025正版pubg mobile国际服

2025正版pubg mobile国际服

飞行射击 下载