Re: core dumps on signals

Albert D. Cahalan (
Fri, 26 Feb 1999 04:49:11 -0500 (EST)

H. Peter Anvin writes:
> By author: "Albert D. Cahalan" <>

>> So the library is supposed to define signal names (and forget libc 5)...
>> Which signal is supposed to be SIGSYS? Neither of the two junk signals
>> dump core, so they can not be substituted without kernel changes.
>> (only 4 of 8 ports have this problem: i386, arm, m68k, ppc)
>> Name Unix98 Linux
>> ---------------------
>> ABRT core core
>> FPE core core
>> ILL core core
>> QUIT core core
>> SEGV core core
>> TRAP core core
>> SYS core n/a (Missing! This is bad!)
>> BUS core exit
>> XCPU core exit
>> XFSZ core exit
>> ALRM exit exit
>> HUP exit exit
>> INT exit exit
>> KILL exit exit
>> PIPE exit exit
>> POLL exit exit
>> PROF exit exit
>> TERM exit exit
>> USR1 exit exit
>> USR2 exit exit
>> VTALRM exit exit
>> PWR n/a exit (normal systems would ignore by default)
> I don't think so; SIGPWR sent to init means it should shut down the
> system as soon as possible. If init dies, the system gets uncleanly
> shut down, but less uncleanly than a power interruption (at least the
> disks are idled.) Therefore this is eminently sensible.

If init dies, init is broken. It should catch the signal.

Signals are often used for odd purposes. For example, SIGHUP is often
used to make a daemon reread config files. Compatibility with the rest
of the world would be nice.

>> STKFLT n/a exit (this is Linux-specific junk)
>> UNUSED n/a exit (this is Linux-specific junk)
> I would still like to suggest these two getting recycled as SIGTHREAD1
> and SIGTHREAD2, for LinuxThreads to use.

No, we need them for SIGSYS and SIGEMT. The Linux-specific signals only
exist on i386, arm, ppc, and m68k. Every other port (sparc*, alpha, mips)
defines SIGSYS and SIGEMT like a normal UNIX or BSD would. We can't have
a LinuxThreads that only works on 1/2 of the Linux ports. LinuxThreads
should be using a reserved portion of the RT signals.

For example, Digital Unix has SIGRTMIN==33 and SIGRTMAX==48.

As another example, UnixWare 7 defines these:
SIGWAITING 32 Ignore All LWPs blocked
SIGLWP 33 Ignore Virtual Interprocessor Interrupt for thread library
SIGAIO 34 Ignore Asynchronous I/O

The same with AIX: they define almost a dozen high numbered signals.

>> WINCH n/a ignore
>> CHLD ignore ignore
>> URG ignore ignore
>> TSTP stop ignore if daemon, otherwise exit
>> TTIN stop ignore if daemon, otherwise exit
>> TTOU stop ignore if daemon, otherwise exit
> This is just wrong: Linux stops if the handler is default on TSTP,
> TTIN, and TTOU which is perfectly correct behaviour. If what you had
> up there was true, ^Z would kill your process.

I know it looks strange, but I tested it. Signals were set to
SIG_DFL before the test. By "daemon" I mean the process forked,
had the parent exit, and had the child call setsid().

>> STOP stop stop
>> CONT unstop unstop
>> EMT n/a n/a (normal systems would core by default)

I would not be surprised to see SIGEMT standardized. Every UNIX has it.
Every BSD has it. ("EMT" is a PDP-11 opcode, so this has a long history)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at