components/bash/patches/solaris-022.bash.sighup.patch
changeset 3871 ddf9e355ac16
child 5518 c47fe0edc204
equal deleted inserted replaced
3869:eb4c6284602f 3871:ddf9e355ac16
       
     1 # Internal patch. Upstream will not accept it.
       
     2 # If read EOF on a non-blank line do not interpret as a NL.
       
     3 # Clear the readline buffers and return eof_found.
       
     4 --- lib/readline/readline.c	2009-08-31 05:45:31.000000000 -0700
       
     5 +++ lib/readline/readline.c	2015-02-18 11:10:55.652803033 -0800
       
     6 @@ -533,7 +533,15 @@
       
     7  
       
     8        /* EOF typed to a non-blank line is a <NL>. */
       
     9        if (c == EOF && rl_end)
       
    10 -	c = NEWLINE;
       
    11 +      {
       
    12 +        _rl_internal_char_cleanup ();
       
    13 +        eof_found = 1;
       
    14 +#if defined (READLINE_CALLBACKS)
       
    15 +        return 0;
       
    16 +#else
       
    17 +        return (eof_found);
       
    18 +#endif
       
    19 +      }
       
    20  
       
    21        /* The character _rl_eof_char typed to blank line, and not as the
       
    22  	 previous character is interpreted as EOF. */