diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-06-04 14:20:01 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-06-04 14:20:01 -0700 |
commit | 69446be1ee063771f2e0b498a50f9b0787ea70c7 (patch) | |
tree | be5ecf3a473052475218df605d350a204666c750 /reader.cpp | |
parent | cc90f9cf803bc4aba928b2a80be451d9b717c5f0 (diff) |
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
Diffstat (limited to 'reader.cpp')
-rw-r--r-- | reader.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -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; |