[EMAIL PROTECTED] wrote:

> Bash Version: 3.1
> Patch Level: 17
> Release Status: release
> 
> Description:
>        Please see mandriva bugreport for a more detailed explanation
>        with examples at: http://qa.mandriva.com/show_bug.cgi?id=21708
> 
>        The problem is that bash always executes the command at the prompt
>        when closing the terminal window.
> 
> Repeat-By:
>        Open up a terminal emulator,
>        (i use konsole for that, but it works also with rxvt)
>        use "su" to get root. Enter a command, which is normally
>        only available to root (i used rpmdrake for that)
>        DO NOT press enter, but quit the terminal by clicking
>        on the exit button.
>        The command which was at the prompt will be executed.

This is not an error -- readline and the shell read EOF when this happens,
not an error from read.  Readline returns the line to the application,
without executing any function bound to accept-line.

>        Alternative method:
> 
>        create a text file with a command, but NO return at the end.
> 
>        echo -n ls > testfile
>        chmod 700 testfile
>        ./testfile
>              you'll find your command has been executed.

EOF delimits a token; it is not an error condition.  If the delimited
token is sufficient to complete a command, the command is considered
parsed and subsequently executed.  All shells I looked at behave this
way.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to