mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
Signal handling cleanup and improved safety
Fixes issue where you couldn't control-C out of a loop (https://github.com/ridiculousfish/fishfish/issues/13) Also stops doing memory allocation in the signal handler (oops) https://github.com/ridiculousfish/fishfish/issues/27
This commit is contained in:
11
reader.cpp
11
reader.cpp
@@ -493,19 +493,12 @@ static void reader_kill( size_t begin_idx, int length, int mode, int newv )
|
||||
|
||||
}
|
||||
|
||||
/* This is called from a signal handler! */
|
||||
void reader_handle_int( int sig )
|
||||
{
|
||||
//PCA INSTANCED_PARSER what is this?
|
||||
block_t *c = NULL;//current_block;
|
||||
|
||||
if( !is_interactive_read )
|
||||
{
|
||||
while( c )
|
||||
{
|
||||
c->type=FAKE;
|
||||
c->skip=1;
|
||||
c=c->outer;
|
||||
}
|
||||
parser_t::skip_all_blocks();
|
||||
}
|
||||
|
||||
interrupted = 1;
|
||||
|
||||
Reference in New Issue
Block a user