This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

resetting signals to SIG_DFL


I want to fork+exec and setup a default environment, including closing all
descriptors and setting all signals to SIG_DFL. However, LinuxThreads
makes use of some real-time signals, so if I were to . . .

	for (sig = 0; sig < _NSIG; sig++)
		signal(sig,SIG_DFL);

. . . I'd clobber those signals. I could skip the signals between __SIGRTMIN
and SIGRTMIN. Will __SIGRTMIN always be available?

OTOH, even if I do clobber these signals, since I've already fork'd and am
about to execl and am only in a single thread, does it even matter? Won't
those signals be set pre-main after execl?

I'm trying to be reasonably portable. Are there other platforms
or issues where the idea of blindly resetting signals like this should
be thrown out?

Curious,

Bill


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]