mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 23:47:25 +00:00
Make 'exit' work in even handlers
darcs-hash:20060208092429-ac50b-f88534a423dc194fdb6453d66b5d4cc7733e54fb.gz
This commit is contained in:
parent
73a9c8bcb8
commit
2555353161
1 changed files with 5 additions and 4 deletions
5
reader.c
5
reader.c
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue