aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-04-04 21:27:22 +1000
committerGravatar axel <axel@liljencrantz.se>2006-04-04 21:27:22 +1000
commit0de232bf549301058efd3c161b204f79e3ab4177 (patch)
tree5b2bf1c97f71fdc7fdb30b0b5305242522a170f2 /builtin.c
parentdb5b8878242d3db8a6e8c3cbf9d6a36b38e4f438 (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 'builtin.c')
-rw-r--r--builtin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin.c b/builtin.c
index 9858446d..fa64356d 100644
--- a/builtin.c
+++ b/builtin.c
@@ -2503,7 +2503,7 @@ static int builtin_jobs( wchar_t **argv )
*/
for( j=first_job; j; j=j->next )
{
- if( j->constructed )
+ if( j->constructed && !job_is_completed(j) )
{
builtin_jobs_print( j, mode, !found );
return 0;
@@ -2536,7 +2536,7 @@ static int builtin_jobs( wchar_t **argv )
j = job_get_from_pid( pid );
- if( j )
+ if( j && !job_is_completed( j ) )
{
builtin_jobs_print( j, mode, !found );
}
@@ -2557,7 +2557,7 @@ static int builtin_jobs( wchar_t **argv )
/*
Ignore unconstructed jobs, i.e. ourself.
*/
- if( j->constructed /*&& j->skip_notification*/ )
+ if( j->constructed && !job_is_completed(j) )
{
builtin_jobs_print( j, mode, !found );
found = 1;