undo fix for Debian PR #71256 which turned to be bogus and break make(1)
This commit is contained in:
		
							
								
								
									
										9
									
								
								check.t
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								check.t
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| # $MirOS: src/bin/mksh/check.t,v 1.24 2005/07/06 00:02:05 tg Exp $ | # $MirOS: src/bin/mksh/check.t,v 1.25 2005/07/07 22:00:45 tg Exp $ | ||||||
| # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas 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: 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 $ | # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ | ||||||
| @@ -3681,7 +3681,7 @@ expected-stderr: | |||||||
| --- | --- | ||||||
| name: errexit-2 | name: errexit-2 | ||||||
| description: | description: | ||||||
| 	Check some "exit on error" edge conditions | 	Check some "exit on error" edge conditions needed for make(1) | ||||||
| stdin: | stdin: | ||||||
| 	set -ex | 	set -ex | ||||||
| 	if /usr/bin/env true; then | 	if /usr/bin/env true; then | ||||||
| @@ -3689,11 +3689,10 @@ stdin: | |||||||
| 	fi | 	fi | ||||||
| 	echo END | 	echo END | ||||||
| expected-stdout: | expected-stdout: | ||||||
| 	END |  | ||||||
| expected-stderr: | expected-stderr: | ||||||
| 	+ /usr/bin/env true | 	+ /usr/bin/env true | ||||||
| 	+ /usr/bin/env false | 	+ /usr/bin/env false | ||||||
| 	+ echo END | expected-exit: 1 | ||||||
| --- | --- | ||||||
| name: version-1 | name: version-1 | ||||||
| description: | description: | ||||||
| @@ -3702,5 +3701,5 @@ category: pdksh | |||||||
| stdin: | stdin: | ||||||
| 	echo $KSH_VERSION | 	echo $KSH_VERSION | ||||||
| expected-stdout: | expected-stdout: | ||||||
| 	@(#)MIRBSD KSH R24 2005/07/06 | 	@(#)MIRBSD KSH R24 2005/07/07 | ||||||
| --- | --- | ||||||
|   | |||||||
							
								
								
									
										16
									
								
								exec.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								exec.c
									
									
									
									
									
								
							| @@ -1,11 +1,11 @@ | |||||||
| /**	$MirOS: src/bin/mksh/exec.c,v 1.7 2005/07/04 12:34:22 tg Exp $ */ | /**	$MirOS: src/bin/mksh/exec.c,v 1.8 2005/07/07 22:00:45 tg Exp $ */ | ||||||
| /*	$OpenBSD: exec.c,v 1.41 2005/03/30 17:16:37 deraadt Exp $	*/ | /*	$OpenBSD: exec.c,v 1.41 2005/03/30 17:16:37 deraadt Exp $	*/ | ||||||
|  |  | ||||||
| #include "sh.h" | #include "sh.h" | ||||||
| #include <sys/stat.h> | #include <sys/stat.h> | ||||||
| #include <ctype.h> | #include <ctype.h> | ||||||
|  |  | ||||||
| __RCSID("$MirOS: src/bin/mksh/exec.c,v 1.7 2005/07/04 12:34:22 tg Exp $"); | __RCSID("$MirOS: src/bin/mksh/exec.c,v 1.8 2005/07/07 22:00:45 tg Exp $"); | ||||||
|  |  | ||||||
| static int	comexec(struct op *, struct tbl *volatile, char **, | static int	comexec(struct op *, struct tbl *volatile, char **, | ||||||
| 		    int volatile); | 		    int volatile); | ||||||
| @@ -30,7 +30,6 @@ execute(struct op *volatile t, | |||||||
| { | { | ||||||
| 	int i; | 	int i; | ||||||
| 	volatile int rv = 0; | 	volatile int rv = 0; | ||||||
| 	volatile int rv_prop = 0; /* rv being propogated or newly generated? */ |  | ||||||
| 	int pv[2]; | 	int pv[2]; | ||||||
| 	char ** volatile ap; | 	char ** volatile ap; | ||||||
| 	char *s, *cp; | 	char *s, *cp; | ||||||
| @@ -112,7 +111,6 @@ execute(struct op *volatile t, | |||||||
|  |  | ||||||
| 	case TPAREN: | 	case TPAREN: | ||||||
| 		rv = execute(t->left, flags|XFORK); | 		rv = execute(t->left, flags|XFORK); | ||||||
| 		rv_prop = 1; |  | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
| 	case TPIPE: | 	case TPIPE: | ||||||
| @@ -225,7 +223,6 @@ execute(struct op *volatile t, | |||||||
| 			rv = execute(t->right, flags & XERROK); | 			rv = execute(t->right, flags & XERROK); | ||||||
| 		else | 		else | ||||||
| 			flags |= XERROK; | 			flags |= XERROK; | ||||||
| 		rv_prop = 1; |  | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
| 	case TBANG: | 	case TBANG: | ||||||
| @@ -268,7 +265,6 @@ execute(struct op *volatile t, | |||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		rv = 0; /* in case of a continue */ | 		rv = 0; /* in case of a continue */ | ||||||
| 		rv_prop = 1; |  | ||||||
| 		if (t->type == TFOR) { | 		if (t->type == TFOR) { | ||||||
| 			while (*ap != NULL) { | 			while (*ap != NULL) { | ||||||
| 				setstr(global(t->str), *ap++, KSH_UNWIND_ERROR); | 				setstr(global(t->str), *ap++, KSH_UNWIND_ERROR); | ||||||
| @@ -278,7 +274,6 @@ execute(struct op *volatile t, | |||||||
| 			for (;;) { | 			for (;;) { | ||||||
| 				if (!(cp = do_selectargs(ap, is_first))) { | 				if (!(cp = do_selectargs(ap, is_first))) { | ||||||
| 					rv = 1; | 					rv = 1; | ||||||
| 					rv_prop = 0; |  | ||||||
| 					break; | 					break; | ||||||
| 				} | 				} | ||||||
| 				is_first = false; | 				is_first = false; | ||||||
| @@ -308,7 +303,6 @@ execute(struct op *volatile t, | |||||||
| 		rv = 0; /* in case of a continue */ | 		rv = 0; /* in case of a continue */ | ||||||
| 		while ((execute(t->left, XERROK) == 0) == (t->type == TWHILE)) | 		while ((execute(t->left, XERROK) == 0) == (t->type == TWHILE)) | ||||||
| 			rv = execute(t->right, flags & XERROK); | 			rv = execute(t->right, flags & XERROK); | ||||||
| 		rv_prop = 1; |  | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
| 	case TIF: | 	case TIF: | ||||||
| @@ -318,7 +312,6 @@ execute(struct op *volatile t, | |||||||
| 		rv = execute(t->left, XERROK) == 0 ? | 		rv = execute(t->left, XERROK) == 0 ? | ||||||
| 		    execute(t->right->left, flags & XERROK) : | 		    execute(t->right->left, flags & XERROK) : | ||||||
| 		    execute(t->right->right, flags & XERROK); | 		    execute(t->right->right, flags & XERROK); | ||||||
| 		rv_prop = 1; |  | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
| 	case TCASE: | 	case TCASE: | ||||||
| @@ -331,12 +324,10 @@ execute(struct op *volatile t, | |||||||
| 		break; | 		break; | ||||||
| 	  Found: | 	  Found: | ||||||
| 		rv = execute(t->left, flags & XERROK); | 		rv = execute(t->left, flags & XERROK); | ||||||
| 		rv_prop = 1; |  | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
| 	case TBRACE: | 	case TBRACE: | ||||||
| 		rv = execute(t->left, flags & XERROK); | 		rv = execute(t->left, flags & XERROK); | ||||||
| 		rv_prop = 1; |  | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
| 	case TFUNCT: | 	case TFUNCT: | ||||||
| @@ -348,7 +339,6 @@ execute(struct op *volatile t, | |||||||
| 		 * (allows "ls -l | time grep foo"). | 		 * (allows "ls -l | time grep foo"). | ||||||
| 		 */ | 		 */ | ||||||
| 		rv = timex(t, flags & ~XEXEC); | 		rv = timex(t, flags & ~XEXEC); | ||||||
| 		rv_prop = 1; |  | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
| 	case TEXEC:		/* an eval'd TCOM */ | 	case TEXEC:		/* an eval'd TCOM */ | ||||||
| @@ -369,7 +359,7 @@ execute(struct op *volatile t, | |||||||
| 	if ((flags&XEXEC)) | 	if ((flags&XEXEC)) | ||||||
| 		unwind(LEXIT);	/* exit child */ | 		unwind(LEXIT);	/* exit child */ | ||||||
| 	if (rv != 0 && !(flags & XERROK)) { | 	if (rv != 0 && !(flags & XERROK)) { | ||||||
| 		if (Flag(FERREXIT) && !rv_prop) | 		if (Flag(FERREXIT)) | ||||||
| 			unwind(LERROR); | 			unwind(LERROR); | ||||||
| 		trapsig(SIGERR_); | 		trapsig(SIGERR_); | ||||||
| 	} | 	} | ||||||
|   | |||||||
							
								
								
									
										6
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								main.c
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| /**	$MirOS: src/bin/mksh/main.c,v 1.21 2005/07/06 00:02:06 tg Exp $ */ | /**	$MirOS: src/bin/mksh/main.c,v 1.22 2005/07/07 22:00:45 tg Exp $ */ | ||||||
| /*	$OpenBSD: main.c,v 1.38 2005/03/30 17:16:37 deraadt Exp $	*/ | /*	$OpenBSD: main.c,v 1.38 2005/03/30 17:16:37 deraadt Exp $	*/ | ||||||
| /*	$OpenBSD: tty.c,v 1.8 2005/03/30 17:16:37 deraadt Exp $	*/ | /*	$OpenBSD: tty.c,v 1.8 2005/03/30 17:16:37 deraadt Exp $	*/ | ||||||
| /*	$OpenBSD: io.c,v 1.21 2005/03/30 17:16:37 deraadt Exp $	*/ | /*	$OpenBSD: io.c,v 1.21 2005/03/30 17:16:37 deraadt Exp $	*/ | ||||||
| @@ -13,9 +13,9 @@ | |||||||
| #include <time.h> | #include <time.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| __RCSID("$MirOS: src/bin/mksh/main.c,v 1.21 2005/07/06 00:02:06 tg Exp $"); | __RCSID("$MirOS: src/bin/mksh/main.c,v 1.22 2005/07/07 22:00:45 tg Exp $"); | ||||||
|  |  | ||||||
| const char ksh_version[] = "@(#)MIRBSD KSH R24 2005/07/06"; | const char ksh_version[] = "@(#)MIRBSD KSH R24 2005/07/07"; | ||||||
|  |  | ||||||
| extern char **environ; | extern char **environ; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user