[Top][All Lists]

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

Re: trap documentation does not match trap behavior

From: Andreas Schwab
Subject: Re: trap documentation does not match trap behavior
Date: Thu, 11 May 2006 14:58:48 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

John Gatewood Ham <address@hidden> writes:

> Description:
>       The info file says "Trapped signals are reset to their original
>         values in a child process when it is created." but this is not
>         true for me with crond and smartd for the SIGTERM signal.

Signals that are ignored are not reset.  This is consistent with the
general behaviour of signals that are set to SIG_IGN across execve.

>         #!/sbin/bash
>         # this launches a crond that will NOT get the SIGTERM
>         # from killall crond and does not shutdown
>         trap '' TERM
>         /usr/sbin/crond -l8

This will run crond with SIGTERM set to SIG_IGN.

> Fix:
>       Remove that sentence from the documentation?

It's not wrong, just incomplete.  See
<http://www.opengroup.org/onlinepubs/009695399/utilities/trap.html> for
the full details.


Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]