Module Name: src
Committed By: kre
Date: Sat Aug 25 02:42:49 UTC 2018
Modified Files:
src/bin/sh: eval.c
Log Message:
PR bin/53548
Deal with the new shell internal exit reason EXEXIT in the case of
a shell which has vfork()'d. It takes a peculiar set of circumstances
to get into a situation where this is ever relevant, but it can be
done. See the PR for details.
To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/bin/sh/eval.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.160 src/bin/sh/eval.c:1.161
--- src/bin/sh/eval.c:1.160 Wed Aug 22 20:08:54 2018
+++ src/bin/sh/eval.c Sat Aug 25 02:42:49 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: eval.c,v 1.160 2018/08/22 20:08:54 kre Exp $ */
+/* $NetBSD: eval.c,v 1.161 2018/08/25 02:42:49 kre Exp $ */
/*-
* Copyright (c) 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
#else
-__RCSID("$NetBSD: eval.c,v 1.160 2018/08/22 20:08:54 kre Exp $");
+__RCSID("$NetBSD: eval.c,v 1.161 2018/08/25 02:42:49 kre Exp $");
#endif
#endif /* not lint */
@@ -1085,7 +1085,8 @@ evalcommand(union node *cmd, int flgs, s
vforked = 2;
_exit(0);
} else {
- _exit(exerrno);
+ _exit(exception == EXEXIT ?
+ exitstatus : exerrno);
}
}
savehandler = handler;