diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-11-23 19:26:12 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-11-23 19:26:12 -0500 |
commit | b1b0b2d7c8574132c39d819dc54522b4fe7e6df9 (patch) | |
tree | 95f51da88feb690d1af90b057fc5ce62819d25de /rltty.c | |
parent | cdd796540cf235ad4b5d4a892570aba697c7fb61 (diff) | |
download | readline-b1b0b2d7c8574132c39d819dc54522b4fe7e6df9.tar.gz |
Readline-6.2 import
Diffstat (limited to 'rltty.c')
-rw-r--r-- | rltty.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -604,7 +604,7 @@ rl_prep_terminal (meta_flag) /* Try to keep this function from being INTerrupted. */ _rl_block_sigint (); - tty = fileno (rl_instream); + tty = rl_instream ? fileno (rl_instream) : fileno (stdin); if (get_tty_settings (tty, &tio) < 0) { @@ -678,7 +678,7 @@ rl_deprep_terminal () /* Try to keep this function from being interrupted. */ _rl_block_sigint (); - tty = fileno (rl_instream); + tty = rl_instream ? fileno (rl_instream) : fileno (stdout); if (_rl_enable_keypad) _rl_control_keypad (0); |