[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SIGSTOP signal



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   Null            Check access to pid
      1     SIGHUP    Hangup          Terminate; can be trapped
      2     SIGINT    Interrupt       Terminate; can be trapped
      3     SIGQUIT   Quit            Terminate with core dump; can be
trapped
      9     SIGKILL   Kill            Forced termination; cannot be
trapped
     15     SIGTERM   Terminate       Terminate; can be trapped
     24     SIGSTOP   Stop            Pause the process; cannot be
trapped  <======
     25     SIGTSTP   Terminal stop   Pause the process; can be trapped
     26     SIGCONT   Continue        Run a stopped process

My debian-sparc box says:

Linux                   November 21, 1999                       1

()                                                             ()

       ALRM 14   exit        HUP  1    exit        INT  2    exit
       KILL 9    exit this   signal   may    not    be    blocked
       PIPE 13   exit        POLL      exit        PROF      exit
       TERM 15   exit        USR1      exit        USR2      exit
       VTALRM         exit  STKFLT         exit may not be imple-
       mented  PWR       ignore    may  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 this    signal    may    not   be   blocked  
<======
       CONT      restart   continue if stopped, otherwise  ignore
       ABRT 6    core        FPE  8    core        ILL  4    core
       QUIT 3    core        SEGV 11   core        TRAP 5    core
       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,
	...



Reply to: