diff options
author | axel <axel@liljencrantz.se> | 2006-04-04 21:27:22 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-04-04 21:27:22 +1000 |
commit | 0de232bf549301058efd3c161b204f79e3ab4177 (patch) | |
tree | 5b2bf1c97f71fdc7fdb30b0b5305242522a170f2 /reader.c | |
parent | db5b8878242d3db8a6e8c3cbf9d6a36b38e4f438 (diff) |
Do not return to the shell until all processes of a job have finished (Previous behaviour was to return once the last job had exited, and could cause e.g. the jobs builtin to print out the job responsible for repainting the titlebar). Also validate that jobs have not completed in various places where the job list is examined
darcs-hash:20060404112722-ac50b-4b6a55ce7c57d39213cdd0ed0f581795a72859b7.gz
Diffstat (limited to 'reader.c')
-rw-r--r-- | reader.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -2265,7 +2265,19 @@ static int read_i() if( data->end_loop) { - if( !prev_end_loop && first_job != 0 ) + job_t *j; + int has_job=0; + + for( j=first_job; j; j=j->next ) + { + if( !job_is_completed(j) ) + { + has_job = 1; + break; + } + } + + if( !prev_end_loop && has_job ) { writestr(_( L"There are stopped jobs\n" )); write_prompt(); |