diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:13:32 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:15:01 -0700 |
commit | 2d698b6e42d8dca191ac795ef5dba3bf62496eec (patch) | |
tree | ac5e0b67043c50f49160e9fe407435706cf30444 /input.c | |
parent | f1250933e4a2ac09a3d0b25b3877068e12f44da5 (diff) | |
download | vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.tar.gz vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.zip |
Integrate bash 3.2 version
This is merge of current Debian stable (Lenny) version of Bash
with Vyatta changes.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -41,11 +41,14 @@ #include "input.h" #include "error.h" #include "externs.h" +#include "quit.h" #if !defined (errno) extern int errno; #endif /* !errno */ +extern void termsig_handler __P((int)); + /* Functions to handle reading input on systems that don't restart read(2) if a signal is received. */ @@ -61,11 +64,14 @@ getc_with_restart (stream) { unsigned char uc; + CHECK_TERMSIG; + /* Try local buffering to reduce the number of read(2) calls. */ if (local_index == local_bufused || local_bufused == 0) { while (1) { + CHECK_TERMSIG; local_bufused = read (fileno (stream), localbuf, sizeof(localbuf)); if (local_bufused > 0) break; @@ -446,6 +452,7 @@ b_fill_buffer (bp) { ssize_t nr; + CHECK_TERMSIG; nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); if (nr <= 0) { @@ -513,6 +520,8 @@ sync_buffered_stream (bfd) int buffered_getchar () { + CHECK_TERMSIG; + #if !defined (DJGPP) return (bufstream_getc (buffers[bash_input.location.buffered_fd])); #else |