[colug-432] Computer Programmer Productivity Ratio

Rob Funk rfunk at funknet.net
Mon Jul 21 14:19:55 EDT 2014


Ethan Dicks wrote:
> On Mon, Jul 21, 2014 at 12:51 PM, R P Herrold <herrold at owlriver.com> wrote:
> > fwiw, and from the last time I read the kill man page, while
> > there are conventional assignments for, say, 9 and 1, these
> > are not mandated ... just convention of a given implementation
> 
> What each app does when it receives a SIGHUP is entirely
> implementation-dependent.  Back in the mists of time, it was just a
> signal to the tty driver that the modem hung up (and to disconnect the
> session)  I'd wager that its functional overloading since then is
> because it's the lowest number and wasn't used for other purposes
> around the machine and was "safe" to use for non-tty-based things.  I
> suppose SIGKILL = -9 is effectively just a convention, but to change
> it, you'd have to start by changing the init process, so I'd call it a
> rather rigidly-established convention at the very least.
> 
> Ultimately, you _could_ randomize the signal number mapping, but
> besides recompiling the entire OS, you'd have more than a few scripts
> to search through (and it would break many apps distributed in
> pre-compiled form).

The kernel determines most of the signal meanings. The numbers are
defined in signal.h (based on POSIX and other standards and
traditions), and could be remapped (followed by recompiling the kernel
and everything else), but the meanings of the defined names mostly
can't be changed. There are, however, variations in the number
mappings of some signals between architectures.

So if either of you are talking about changing the meanings of signal
numbers without recompiling the kernel and everything else, it won't
work because:
1. The kernel sends certain signals to processes at certain times to
indicate certain events. 
2. Most signals have a default action in the kernel, e.g. terminate,
dump core, stop (pause) process.
3. The KILL and STOP signals can't be caught, blocked, or ignored.

If you're really talking about changing signal.h and then recompiling
the world from the kernel on up, carry on with your crazy ways. :-)


More information about the colug-432 mailing list