From: Theodore Y. Ts'o (tytso@athena.mit.edu)
Date: 02/03/92


From: tytso@athena.mit.edu (Theodore Y. Ts'o)
Subject: Re: POSIX problems
Date: Mon, 3 Feb 1992 07:07:09 GMT

In article <BRTMAC.92Feb2015711@maverick.ksu.ksu.edu> brtmac@maverick.ksu.ksu.edu (Brett McCoy) writes:

>In trying to compile GNU make 3.63 I found that SIGBUS and SIGSYS aren't
>defined in /usr/include/signal.h. SIGUSR1 and SIGUSR2 are where SIGBUS
>and SIGSYS are on our Sun systems. Did POSIX change where these are, or
>is signal.h incorrect.

Neither. POSIX doesn't define what numbers the signals correspond to
--- programs are expected to #include <signal.h> and use the symbolic
names. Programs that don't do this deserve everything they get.
(Although most OS implementations would be fools to move certain
standard ones, like 1, 4, and 9, since users often will type the numbers
for those kill commands: "kill -9 562", for example).

Similarily, POSIX doesn't require that SIGBUS and SIGSYS be defined, so
on Linux, they aren't. Programs that try to trap them should probably
surround their call like this:

#ifdef SIGBUS
        signal(SIGBUS, allocate_more_memory);
#endif

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Theodore Ts'o bloom-beacon!mit-athena!tytso
308 High St., Medford, MA 02155 tytso@athena.mit.edu
   Everybody's playing the game, but nobody's rules are the same!