I'm writing a library where I fork() and execvp() to start another program. As I've understood, execvX() resets "custom" signal handlers to SIG_DFL but it doesn't set any ignored signals handlers to SIG_DFL.
Keeping in mind it is a library and I can't control what users will do with the signals, is it a good idea to set the signal handlers of ignored signals to SIG_DFL?
If it is, is there some way to set all signal handlers to SIG_DFL at once? Do I have to iterate through all signals numbers instead? And in this case, how can I find the last possible signal number? I've seen there is _NSIG in bits/signum.h. Is this constant part of POSIX or is it Linux-specific?
Thanks.