aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-07-08 01:35:39 +1000
committerGravatar axel <axel@liljencrantz.se>2006-07-08 01:35:39 +1000
commit9830bf985ac176b873ce0e833f6fdb1bd9793364 (patch)
treef404af43fd5efaf7dd2adb05d505274768c12090 /proc.c
parent7bb070d8175c23111ac533cef6a4322881324900 (diff)
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
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/proc.c b/proc.c
index 5c60c5b2..f3c5eebc 100644
--- a/proc.c
+++ b/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
*/
@@ -265,14 +265,11 @@ int job_is_completed( const job_t *j )
{
process_t *p;
- for (p = j->first_process; p; p = p->next)
- {
- if (!p->completed)
- {
- return 0;
- }
- }
- return 1;
+ for (p = j->first_process; p->next; p = p->next)
+ ;
+
+ return p->completed;
+
}
/**
@@ -1013,6 +1010,7 @@ void job_continue (job_t *j, int cont)
signal_unblock();
}
}
+
}
void proc_sanity_check()