For portability,use only the functions described in this section to initialize,change,and retrieve information fromsigset_t objects--don't try to manipulate them directly.
sigemptysetand then add specified signals individually. Or you can specify it to be full withsigfillset and then delete specified signals individually.
sigset_tobject might include some other information (like a version field) that needs to be initialized as well. (In addition,it's not wise to put into your program an assumption that the system has no signals aside from the ones you know about.)
intsigemptyset(sigset_t *set)
-
This function initializes the signal setsetto exclude all of the defined signals. It always returns
0 .
intsigfillset(sigset_t *set)
-
This function initializes the signal setsetto include all of the defined signals. Again,the return value is
0 .
intsigaddset(sigset_t *set,intsignum)
-
This function adds the signalsignumto the signal setset. All
sigaddset does is modifyset; it does not block or unblock any signals. (编辑:ASP站长)
【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。
|