I noticed that when a value has to be assigned to sigset_t sa_mask
and for example an empty value we can use the function
sigemptyset(&sa.sa_mask)
. I discovered it on StackOverflow.
But when you look at the man sigaction
, and struct sigaction
there is no mention of how are we going to assign value to sa_mask
.
What I understand is for us it's of an unknown type so we cannot assume
it be anything and instead there should be some function that could
help us assign the value for type sigset_t
. But the man page
doesn't mention anything about functions like sigemptyset
.
How can one discover using man pages or some other tools that
you have to use some function like sigemptyset
to initialize the
sa_mask to be empty?
Asked
Active
Viewed 191 times
0

asha rani
- 41
- 6
-
1[sigemptyset()](https://linux.die.net/man/3/sigemptyset) is just one of a family of APIs that let you clear, fill, add to and delete from a signal mask. See also sigaddset(), sigdelset(), sigfillset() and sigismember() – paulsm4 Dec 09 '20 at 22:51
-
Which operating system's manpages are you looking at ? The answer may well be 'you should contact the author of the sigaction manpage and ask for it to be improved' – zwol Dec 09 '20 at 22:53
-
I have ubuntu WSL on windows 10 – asha rani Dec 09 '20 at 22:55
-
"WSL == Windows subsystem for Linux". Ha ha ha :) Most *real* *nix man pages will cross-reference "sigemptyset()" et al with "sigaction()". For example: https://man7.org/linux/man-pages/man2/sigaction.2.html – paulsm4 Dec 09 '20 at 23:01
-
man7 page does list the sigemptyset at the end. Whereas my local manpage doesnt. But still I think it doesnt mention anywhere how are we supposed to assign a value to a type **sigset_t**. Like there are other functions also in the family that allow to add delete signal mask. How do we discover them. Say I want to discover all APIs that deal with **sigset_t** type – asha rani Dec 10 '20 at 11:27
-
The cross reference you want is to `sigsetops(3)`, but you're right, this probably should be clarified. I suggest contacting linux-man@vger.kernel.org and telling them what you told us. – zwol Dec 10 '20 at 13:05