mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-01 07:53:38 +02:00
read builtin timeouts no longer use SIGALRM
This commit is contained in:
@@ -906,6 +906,7 @@ extern int rl_persistent_signal_handlers;
|
||||
#define RL_STATE_REDISPLAYING 0x1000000 /* updating terminal display */
|
||||
|
||||
#define RL_STATE_DONE 0x2000000 /* done; accepted line */
|
||||
#define RL_STATE_TIMEOUT 0x4000000 /* readline() timed out */
|
||||
|
||||
#define RL_SETSTATE(x) (rl_readline_state |= (x))
|
||||
#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x))
|
||||
|
||||
+3
-1
@@ -46,6 +46,7 @@ extern int executing_builtin;
|
||||
extern void check_signals_and_traps (void);
|
||||
extern void check_signals (void);
|
||||
extern int signal_is_trapped (int);
|
||||
extern int read_builtin_timeout (int);
|
||||
|
||||
/* Read LEN bytes from FD into BUF. Retry the read on EINTR. Any other
|
||||
error causes the loop to break. */
|
||||
@@ -58,7 +59,8 @@ zread (fd, buf, len)
|
||||
ssize_t r;
|
||||
|
||||
check_signals (); /* check for signals before a blocking read */
|
||||
while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
|
||||
while (((r = read_builtin_timeout (fd)) < 0 || (r = read (fd, buf, len)) < 0) &&
|
||||
errno == EINTR)
|
||||
{
|
||||
int t;
|
||||
t = errno;
|
||||
|
||||
Reference in New Issue
Block a user