|
From: Avery P. <ape...@ni...> - 2003-11-15 17:57:52
|
On Fri, Nov 14, 2003 at 06:20:14PM +0100, Dimitri Papadopoulos-Orfanos wrote: > >>==14433== Warning: attempt to set SIGKILL handler in __NR_sigaction. > >>==14433== Warning: attempt to set SIGSTOP handler in __NR_sigaction. > > >They're almost not worth warning about. SIGKILL and SIGSTOP cannot be > >caught or handled in any way, so trying to set them to anything other > >than SIG_DFL with sigaction is an error - but a very minor one with no > >side-effects. This warning is common with code which does something > >like: > > > > for(sig = 1; sig < NSIG; sig++) > > sigaction(sig, &sa, NULL); > > Maybe the wording can be improved, so that "normal" programers can > understand it. For example by changing from: > attempt to set SIGKILL handler in __NR_sigaction. > to: > attempt to set a handler for SIGKILL signal. > > Also maybe this can be added to the FAQ. If even 'ls' emits such > warnings, I guess many other programs will emit them too. How about: "warning: attempt to set SIGKILL handler never has an effect"? Also, for programs that set the sighandler in a loop - apparently include ls on some systems - I bet they're usually *disabling* a special handler, ie. 'sa' is NULL in the code fragment below. It would probably give fewer spurious warnings if we just didn't print a warning when sa==NULL. Have fun, Avery |