mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 03:13:37 +08:00
When exiting, only warn about _stopped_ background jobs (fix #111)
This commit is contained in:
parent
5023ade7ac
commit
1b1aa07414
|
@ -2819,7 +2819,7 @@ int exit_status()
|
|||
static void handle_end_loop()
|
||||
{
|
||||
job_t *j;
|
||||
int job_count=0;
|
||||
int stopped_jobs_count=0;
|
||||
int is_breakpoint=0;
|
||||
block_t *b;
|
||||
parser_t &parser = parser_t::principal_parser();
|
||||
|
@ -2838,14 +2838,14 @@ static void handle_end_loop()
|
|||
job_iterator_t jobs;
|
||||
while ((j = jobs.next()))
|
||||
{
|
||||
if (!job_is_completed(j))
|
||||
if (!job_is_completed(j) && (job_is_stopped(j)))
|
||||
{
|
||||
job_count++;
|
||||
stopped_jobs_count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!reader_exit_forced() && !data->prev_end_loop && job_count && !is_breakpoint)
|
||||
if (!reader_exit_forced() && !data->prev_end_loop && stopped_jobs_count && !is_breakpoint)
|
||||
{
|
||||
writestr(_(L"There are stopped jobs. A second attempt to exit will enforce their termination.\n"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user