mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-10 20:20:38 +02:00
commit bash-20121012 snapshot
This commit is contained in:
@@ -44,6 +44,11 @@
|
||||
#include "builtins/common.h"
|
||||
#include "builtins/builtext.h"
|
||||
|
||||
#if defined (READLINE)
|
||||
# include <readline/readline.h>
|
||||
# include "bashline.h"
|
||||
#endif
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
@@ -398,6 +403,11 @@ trap_handler (sig)
|
||||
longjmp (wait_intr_buf, 1);
|
||||
}
|
||||
|
||||
#if defined (READLINE)
|
||||
if (RL_ISSTATE (RL_STATE_SIGHANDLER) && interrupt_immediately == 0)
|
||||
bashline_set_event_hook ();
|
||||
#endif
|
||||
|
||||
if (interrupt_immediately)
|
||||
run_pending_traps ();
|
||||
|
||||
@@ -418,6 +428,24 @@ first_pending_trap ()
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
any_signals_trapped ()
|
||||
{
|
||||
register int i;
|
||||
|
||||
for (i = 1; i < NSIG; i++)
|
||||
if (sigmodes[i] & SIG_TRAPPED)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void
|
||||
check_signals_and_traps ()
|
||||
{
|
||||
QUIT;
|
||||
run_pending_traps ();
|
||||
}
|
||||
|
||||
#if defined (JOB_CONTROL) && defined (SIGCHLD)
|
||||
|
||||
#ifdef INCLUDE_UNUSED
|
||||
|
||||
Reference in New Issue
Block a user