Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.4
libreadline5
readline-4.3-input.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File readline-4.3-input.dif of Package libreadline5
Index: input.c =================================================================== --- input.c.orig +++ input.c @@ -448,6 +448,8 @@ rl_read_key () return (c); } +extern int _rl_read_zero_char_from_tty; + int rl_getc (stream) FILE *stream; @@ -469,7 +471,10 @@ rl_getc (stream) /* If zero characters are returned, then the file that we are reading from is empty! Return EOF in that case. */ if (result == 0) - return (EOF); + { + _rl_read_zero_char_from_tty = 1; + return (EOF); + } #if defined (__BEOS__) if (errno == EINTR) Index: readline.c =================================================================== --- readline.c.orig +++ readline.c @@ -440,6 +440,9 @@ _rl_internal_char_cleanup () _rl_erase_entire_line (); } +/* Catch EOF from tty, do not return command line */ +int _rl_read_zero_char_from_tty = 0; + STATIC_CALLBACK int #if defined (READLINE_CALLBACKS) readline_internal_char () @@ -484,6 +487,10 @@ readline_internal_charloop () c = rl_read_key (); RL_UNSETSTATE(RL_STATE_READCMD); + /* Return here if terminal is closed */ + if (c == EOF && _rl_read_zero_char_from_tty) + return (rl_done = 1); + /* look at input.c:rl_getc() for the circumstances under which this will be returned; punt immediately on read error without converting it to a newline. */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor