Nuno Almeida wrote:
>
> I would like to know if this is simply a singularity of Debian, or if it's a
> bug of mine.
>
> When I'm programming in C/C++ to other linux distr. and I make a signal trap
> I can't, and that's absolutly normal, trap the signals 9 and 17, for SIGKILL
> and SIGSTOP.
> On Debian I can catch the SIGSTOP signal is this normal? Why the diference?
Nothing can trap SIGKILL. Elsewise, how could anything be killed for
sure?
I'm not really familiar with SIGSTOP. But let me check... (snips from
man
below).
Looks like it is _not_ normal to trap the SIGSTOP, not even on Linux,
including
Debian. If it _can_ it should be a bug to report to the maintainer of
kernel-image*.
My HP-UX box says (from `man kill`):
0 SIGNULL NullCheck access to pid
1 SIGHUPHangup Terminate; can be trapped
2 SIGINTInterrupt Terminate; can be trapped
3 SIGQUIT QuitTerminate with core dump; can be
trapped
9 SIGKILL KillForced termination; cannot be
trapped
15 SIGTERM Terminate Terminate; can be trapped
24 SIGSTOP StopPause the process; cannot be
trapped <==
25 SIGTSTP Terminal stop Pause the process; can be trapped
26 SIGCONT ContinueRun a stopped process
My debian-sparc box says:
Linux November 21, 1999 1
() ()
ALRM 14 exitHUP 1exitINT 2exit
KILL 9exit this signal maynotbeblocked
PIPE 13 exitPOLL exitPROF exit
TERM 15 exitUSR1 exitUSR2 exit
VTALRM exit STKFLT exit may not be imple-
mented PWR ignoremay exit on some systems
WINCH ignore CHLD ignore URG ignore
TSTP stop may interact with the shell
TTIN stop may interact with the shell
TTOU stop may interact with the shell
STOP stop thissignalmaynot be blocked
<==
CONT restart continue if stopped, otherwise ignore
ABRT 6coreFPE 8coreILL 4core
QUIT 3coreSEGV 11 coreTRAP 5core
SYS core may not be implemented EMT core may
not be implemented BUS core core dump may fail
XCPU core core dump may fail XFSZ core core dump
may fail
The man page on Solaris 7 says:
...
The signal() and sigset() functions modify signal disposi-
tions. The sig argument specifies the signal, which may be
any signal except SIGKILL and SIGSTOP. The disp argument
<
specifies the signal's disposition, which may be SIG_DFL,
...