jobs.c: apply patch from deraadt@o:
│remember to restore errno (ie. stop someone from making a mistake later) │ok guenther check.t, sh.h: bump vsn I wonder though why errno must be restored even if nothing was called after reading it… moid?
This commit is contained in:
parent
01823e0e11
commit
c413edb34a
4
check.t
4
check.t
|
@ -1,4 +1,4 @@
|
|||
# $MirOS: src/bin/mksh/check.t,v 1.349 2009/12/12 22:27:03 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.350 2009/12/31 14:05:42 tg Exp $
|
||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
||||
|
@ -25,7 +25,7 @@
|
|||
# http://www.research.att.com/~gsf/public/ifs.sh
|
||||
|
||||
expected-stdout:
|
||||
@(#)MIRBSD KSH R39 2009/12/12
|
||||
@(#)MIRBSD KSH R39 2009/12/31
|
||||
description:
|
||||
Check version of shell.
|
||||
stdin:
|
||||
|
|
5
jobs.c
5
jobs.c
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.66 2009/12/12 22:27:08 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.67 2009/12/31 14:05:43 tg Exp $");
|
||||
|
||||
#if HAVE_KILLPG
|
||||
#define mksh_killpg killpg
|
||||
|
@ -1120,7 +1120,7 @@ j_sigchld(int sig MKSH_A_UNUSED)
|
|||
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);
|
||||
|
@ -1166,6 +1166,7 @@ j_sigchld(int sig MKSH_A_UNUSED)
|
|||
check_job(j); /* check to see if entire job is done */
|
||||
} while (1);
|
||||
|
||||
finished:
|
||||
errno = errno_;
|
||||
}
|
||||
|
||||
|
|
4
sh.h
4
sh.h
|
@ -148,9 +148,9 @@
|
|||
#endif
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.370 2009/12/12 22:27:09 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.371 2009/12/31 14:05:44 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R39 2009/12/12"
|
||||
#define MKSH_VERSION "R39 2009/12/31"
|
||||
|
||||
#ifndef MKSH_INCLUDES_ONLY
|
||||
|
||||
|
|
Loading…
Reference in New Issue