projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
$ ); echo $? echoed 0,all other shells echo 2.
[unix-history]
/
usr
/
src
/
bin
/
sh
/
main.c
diff --git
a/usr/src/bin/sh/main.c
b/usr/src/bin/sh/main.c
index
f8b3858
..
aa820e7
100644
(file)
--- a/
usr/src/bin/sh/main.c
+++ b/
usr/src/bin/sh/main.c
@@
-15,7
+15,7
@@
static char copyright[] =
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 8.
4
(Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 8.
5
(Berkeley) %G%";
#endif /* not lint */
#include <stdio.h>
#endif /* not lint */
#include <stdio.h>
@@
-87,6
+87,8
@@
main(argc, argv)
* exception EXSHELLPROC to clean up before executing
* the shell procedure.
*/
* exception EXSHELLPROC to clean up before executing
* the shell procedure.
*/
+ if (exception == EXERROR)
+ exitstatus = 2;
if (exception == EXSHELLPROC) {
rootpid = getpid();
rootshell = 1;
if (exception == EXSHELLPROC) {
rootpid = getpid();
rootshell = 1;