diff --git a/parser.cpp b/parser.cpp index f93dbf3a6..32b9f2228 100644 --- a/parser.cpp +++ b/parser.cpp @@ -391,10 +391,12 @@ void parser_t::skip_all_blocks(void) /* Tell all blocks to skip */ if (s_principal_parser) { + //write(2, "Cancelling blocks\n", strlen("Cancelling blocks\n")); block_t *c = s_principal_parser->current_block; while( c ) { c->skip = true; + //fprintf(stderr, " Cancelled %p\n", c); c = c->outer; } } @@ -2292,7 +2294,7 @@ void parser_t::eval_job( tokenizer *tok ) profile_item_t *profile_item = NULL; - int skip = 0; + bool skip = false; int job_begin_pos, prev_tokenizer_pos; const bool do_profile = profile; @@ -2333,7 +2335,6 @@ void parser_t::eval_job( tokenizer *tok ) } j->first_process = new process_t(); - job_begin_pos = tok_get_pos( tok ); if( parse_job( j->first_process, j, tok ) && @@ -2358,9 +2359,9 @@ void parser_t::eval_job( tokenizer *tok ) profile_item->skipped=current_block->skip; } - skip |= current_block->skip; - skip |= job_get_flag( j, JOB_WILDCARD_ERROR ); - skip |= job_get_flag( j, JOB_SKIP ); + skip = skip || current_block->skip; + skip = skip || job_get_flag( j, JOB_WILDCARD_ERROR ); + skip = skip || job_get_flag( j, JOB_SKIP ); if(!skip ) { @@ -2396,7 +2397,9 @@ void parser_t::eval_job( tokenizer *tok ) { case WHILE_TEST_FIRST: { - current_block->skip = proc_get_last_status()!= 0; + // PCA I added the 'current_block->skip ||' part because we couldn't reliably + // control-C out of loops like this: while test 1 -eq 1; end + current_block->skip = current_block->skip || proc_get_last_status()!= 0; current_block->state1()=WHILE_TESTED; } break; diff --git a/release_notes.html b/release_notes.html index dc9855675..8484087d4 100644 --- a/release_notes.html +++ b/release_notes.html @@ -19,6 +19,7 @@ li {
  • Overrides of default functions should be fixed. The "internalized scripts" feature is disabled for now.
  • Disabled delayed suspend. This is a strange job-control feature of BSD systems, including OS X. Disabling it frees up Control Y for other purposes; in particular, for yank, which now works on OS X.
  • fish_indent is fixed. In particular, the funced and funcsave functions work again. +
  • A SIGTERM now ends the whole execution stack again (from this issue).