mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 06:03:49 +08:00
Fix psub deadlocks by once again considering a job as completed whenever the last process in the pipeline is dead
darcs-hash:20060707153539-ac50b-76842c851c3a4247c086e3242f70361b9d2d396b.gz
This commit is contained in:
parent
7bb070d817
commit
9830bf985a
16
proc.c
16
proc.c
|
@ -257,7 +257,7 @@ int job_is_stopped( const job_t *j )
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Return true if all processes in the job have completed.
|
Return true if the last processes in the job has completed.
|
||||||
|
|
||||||
\param j the job to test
|
\param j the job to test
|
||||||
*/
|
*/
|
||||||
|
@ -265,14 +265,11 @@ int job_is_completed( const job_t *j )
|
||||||
{
|
{
|
||||||
process_t *p;
|
process_t *p;
|
||||||
|
|
||||||
for (p = j->first_process; p; p = p->next)
|
for (p = j->first_process; p->next; p = p->next)
|
||||||
{
|
;
|
||||||
if (!p->completed)
|
|
||||||
{
|
return p->completed;
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1013,6 +1010,7 @@ void job_continue (job_t *j, int cont)
|
||||||
signal_unblock();
|
signal_unblock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void proc_sanity_check()
|
void proc_sanity_check()
|
||||||
|
|
2
proc.h
2
proc.h
|
@ -276,7 +276,7 @@ job_t *job_get_from_pid(int pid);
|
||||||
int job_is_stopped( const job_t *j );
|
int job_is_stopped( const job_t *j );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests if the job has completed
|
Tests if the job has completed, i.e. if the last process of the pipeline has ended.
|
||||||
*/
|
*/
|
||||||
int job_is_completed( const job_t *j );
|
int job_is_completed( const job_t *j );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user