summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-12-13 04:36:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-12-13 04:36:49 +0000
commit96af82aa4cfcf2e07ccfcf14f9b99f88db8c23da (patch)
tree4e0f109624b57b8934ef4adb033ac8847d562900 /bin
parent39cf359256414d5b1eb653a41dbe497fbd8dc1af (diff)
remember to restore errno (ie. stop someone from making a mistake later)
ok guenther
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/jobs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ksh/jobs.c b/bin/ksh/jobs.c
index b31ff5266ee..67d07263a81 100644
--- a/bin/ksh/jobs.c
+++ b/bin/ksh/jobs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: jobs.c,v 1.38 2009/12/12 04:28:44 deraadt Exp $ */
+/* $OpenBSD: jobs.c,v 1.39 2009/12/13 04:36:48 deraadt Exp $ */
/*
* Process and job control
@@ -1102,7 +1102,7 @@ j_sigchld(int sig)
for (j = job_list; j; j = j->next)
if (j->ppid == procpid && !(j->flags & JF_STARTED)) {
held_sigchld = 1;
- return;
+ goto finished;
}
getrusage(RUSAGE_CHILDREN, &ru0);
@@ -1148,6 +1148,7 @@ found:
check_job(j); /* check to see if entire job is done */
} while (1);
+finished:
errno = errno_;
}