Make 'exit' work in even handlers

darcs-hash:20060208092429-ac50b-f88534a423dc194fdb6453d66b5d4cc7733e54fb.gz
This commit is contained in:
axel 2006-02-08 19:24:29 +10:00
parent 73a9c8bcb8
commit 2555353161

View file

@ -875,9 +875,8 @@ void reader_destroy()
void reader_exit( int do_exit ) void reader_exit( int do_exit )
{ {
if( is_interactive ) if( data )
data->end_loop=do_exit; data->end_loop=do_exit;
else
end_loop=do_exit; end_loop=do_exit;
} }
@ -2978,6 +2977,8 @@ int reader_read( int fd )
If the exit command was called in a script, only exit the If the exit command was called in a script, only exit the
script, not the program script, not the program
*/ */
if( data )
data->end_loop = 0;
end_loop = 0; end_loop = 0;
is_interactive = shell_was_interactive; is_interactive = shell_was_interactive;