commit bash-20121012 snapshot

This commit is contained in:
Chet Ramey
2012-11-02 09:04:50 -04:00
parent 1562376007
commit 55a5a4acde
30 changed files with 23793 additions and 20 deletions
+11 -3
View File
@@ -519,14 +519,22 @@ rl_getc (stream)
#undef X_EWOULDBLOCK
#undef X_EAGAIN
/* fprintf(stderr, "rl_getc: result = %d errno = %d\n", result, errno); */
/* If the error that we received was EINTR, then try again,
this is simply an interrupted system call to read ().
Otherwise, some error ocurred, also signifying EOF. */
this is simply an interrupted system call to read (). We allow
the read to be interrupted if we caught SIGHUP or SIGTERM (but
not SIGINT; let the signal handler deal with that), but if the
application sets an event hook, call it for other signals.
Otherwise (not EINTR), some error ocurred, also signifying EOF. */
if (errno != EINTR)
return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM)
return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
else if (rl_event_hook)
else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT)
RL_CHECK_SIGNALS ();
if (rl_event_hook)
(*rl_event_hook) ();
}
}