bug-bash
[Top][All Lists]
Advanced

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

Re: unsafe signal handler


From: Tim Waugh
Subject: Re: unsafe signal handler
Date: Fri, 22 Jul 2005 17:05:49 +0100
User-agent: Mutt/1.4.2.1i

I am looking at bash-3.0, trying to untangle the
termination_unwind_protect() signal handler.  I cannot work out under
what circumstances the function run_interrupt_trap() is called.

sighandler
termination_unwind_protect (sig)
     int sig;
{
  if (sig == SIGINT && signal_is_trapped (SIGINT))
    run_interrupt_trap ();

If I run "trap 'echo foxtrot' SIGINT", the signal hander seems to be
changed to trap_handler(), and so termination_unwind_protect() is not
called.

Can those two lines at the top of termination_unwind_protect() be
removed?

Tim.
*/

Attachment: pgpSR3fZMQbwb.pgp
Description: PGP signature


reply via email to

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