If we can set up a mask with sigemptyset(), sigaddset(), sigdelset() and
sigfillset(), Is there an accepted way to copy the data from one signal
mask set to another?
In other words, If I have code that looks like this:
sigset_t sigmask1, sigmask2;
/* magic code to copy sigmask1 to sigmask2 */
How do I go about copying the mask stored in sigmask1 to sigmask2 if I’m
theoretically not supposed to know the structure of sigset_t? I’m kinda
wary about using memcpy() because AFAIK it could be dangerous depending
on what the structure of sigset_t looks like and how the compiler
optimizes memory usage…
Or is the answer “You should not do something like this at all…”?