[Gllug] Killing processes on Solaris [OTish]

Nix nix at esperi.demon.co.uk
Sat Mar 23 13:03:41 UTC 2002


On Fri, 22 Mar 2002, Simon Rumble stated:
> Don't know about your problem but you shouldn't use numeric signals
> for portability.  kill -KILL == kill -9.  See man kill(1).

This signal number is required to work with the kill command --- not
with kill(3), but with kill(1):

,----[ Base Specifications, Issue 6, Utilities, kill(1), Options ]
|  -signal_number
|      [XSI] [Option Start]
|      Specify a non-negative decimal integer, signal_number,
|      representing the signal to be used instead of SIGTERM, as the
|      sig argument in the effective call to kill(). The
|      correspondence between integer values and the sig value used is
|      shown in the following table.
|     
|      The effects of specifying any signal_number other than those
|      listed in the table are undefined. [Option End]
| 
|  +------------------------------------+
|  |     signal_number      | sig Value |
|  |------------------------+-----------|
|  | [XSI] [Option Start] 0 | 0         |
|  |------------------------+-----------|
|  | 1                      | SIGHUP    |
|  |------------------------+-----------|
|  | 2                      | SIGINT    |
|  |------------------------+-----------|
|  | 3                      | SIGQUIT   |
|  |------------------------+-----------|
|  | 6                      | SIGABRT   |
|  |------------------------+-----------|
|  | 9                      | SIGKILL   |
|  |------------------------+-----------|
|  | 14                     | SIGALRM   |
|  |------------------------+-----------|
|  | 15                     | SIGTERM   |
|  +------------------------------------+
| 
|  If the first argument is a negative integer, it shall be
|  interpreted as a - signal_number option, not as a negative pid
|  operand specifying a process group. [Option End]
`----

Not all signal numbers work but the common ones do. SIGCONT and SIGSTOP
don't, so you'll have to keep sending those by the long form :)

-- 
`Oh, I seeeee, good light; bad light. Presumably the bad light is
 different -- perhaps it's a sawtooth waveform, and the pointy bits
 scratch your eyes?' --- John Ineson to a `monitors emit radiation,
 all radiation is bad, therefore monitors are bad' tub-thumper


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list