bug-bash
[Top][All Lists]
Advanced

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

Re: Signals ignored by a shell cannot be handled by its sub-shells?


From: Andreas Schwab
Subject: Re: Signals ignored by a shell cannot be handled by its sub-shells?
Date: Tue, 12 Jul 2011 09:34:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

"Clark J. Wang" <address@hidden> writes:

> For example:
>
> [bash-4.2.8] # cat a.sh
> trap '' TERM
> bash b.sh
> [bash-4.2.8] # cat b.sh
> echo "Now in $0 ..."
> trap sig_TERM TERM

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#trap

"Signals that were ignored on entry to a non-interactive shell cannot be
trapped or reset, although no error need be reported when attempting to
do so. An interactive shell may reset or catch signals ignored on entry."

Andreas.

-- 
Andreas Schwab, address@hidden
GPG 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]