sigaddset()

#in clude>sign in

函式原型

表頭檔案 #include<signal.h>
定義函式 int sigaddset(sigset_t *set,int signum);

作用

sigaddset()用來將參數signum 代表的信號加入至參數set 信號集裡。
The sigaddset() function adds the individual signal specified by the signo to the signal set pointed to by set. Applications must call either sigemptyset() or sigfillset() at least once for each object of type sigset_t prior to any other use of that object. If such an object is not initialised in this way, but is nonetheless supplied as an argument to any of sigaction(), sigaddset(), sigdelset(), sigismember(), sigpending() or sigprocmask(), the results are undefined.

返回值

執行成功則返回0,如果有錯誤則返回-1。

相關詞條

熱門詞條

聯絡我們