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: Clark J. Wang
Subject: Re: Signals ignored by a shell cannot be handled by its sub-shells?
Date: Tue, 12 Jul 2011 16:59:02 +0800

On Tue, Jul 12, 2011 at 3:34 PM, Andreas Schwab <schwab@linux-m68k.org>wrote:

> "Clark J. Wang" <dearvoid@gmail.com> 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."
>
>
Thanks and I also found that in Bash's man page.


> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> 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]