草庐IT

c - sigwait() 和信号处理程序

如果我为SIGABRT设置和发出信号处理程序,同时我有一个线程在sigwait()上等待SIGABRT到来(我在其他线程中有一个被pthread_sigmask阻塞的SIGABRT)。那么先处理哪一个呢?信号处理程序或sigwait()?[我面临一些问题,sigwait()永远被阻止。我目前正在调试它]main(){sigset_tsignal_set;sigemptyset(&signal_set);sigaddset(&signal_set,SIGABRT);sigprocmask(SIG_BLOCK,&signal_set,NULL);//DontdeliverSIGABORTw

c - sigwait() 和信号处理程序

如果我为SIGABRT设置和发出信号处理程序,同时我有一个线程在sigwait()上等待SIGABRT到来(我在其他线程中有一个被pthread_sigmask阻塞的SIGABRT)。那么先处理哪一个呢?信号处理程序或sigwait()?[我面临一些问题,sigwait()永远被阻止。我目前正在调试它]main(){sigset_tsignal_set;sigemptyset(&signal_set);sigaddset(&signal_set,SIGABRT);sigprocmask(SIG_BLOCK,&signal_set,NULL);//DontdeliverSIGABORTw

c - 关于sigwait()的模糊描述

Ifnosignalinsetispendingatthetimeofthecall,thethreadshallbesuspendeduntiloneormorebecomespending.Thesignalsdefinedbysetshallhavebeenblockedatthetimeofthecalltosigwait();otherwise,thebehaviorisundefined.Theeffectofsigwait()onthesignalactionsforthesignalsinsetisunspecified.这真是模棱两可,这里的pending和block

c - 关于sigwait()的模糊描述

Ifnosignalinsetispendingatthetimeofthecall,thethreadshallbesuspendeduntiloneormorebecomespending.Thesignalsdefinedbysetshallhavebeenblockedatthetimeofthecalltosigwait();otherwise,thebehaviorisundefined.Theeffectofsigwait()onthesignalactionsforthesignalsinsetisunspecified.这真是模棱两可,这里的pending和block