Module Name:    src
Committed By:   kre
Date:           Thu Nov  8 18:37:43 UTC 2018

Modified Files:
        src/bin/sh: parser.c

Log Message:
Allow shells forked to run command substitutions while expanding
prompts to exit when they're done, rather than forcing them to
turn into interactive shells and start reading input ...

Completes a part of the previous changes (just 10+ weeks late...)

Should fix the prompt expansion issue reported by Ca�c on
current-users.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/bin/sh/parser.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/parser.c
diff -u src/bin/sh/parser.c:1.150 src/bin/sh/parser.c:1.151
--- src/bin/sh/parser.c:1.150	Sun Aug 19 23:50:27 2018
+++ src/bin/sh/parser.c	Thu Nov  8 18:37:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.150 2018/08/19 23:50:27 kre Exp $	*/
+/*	$NetBSD: parser.c,v 1.151 2018/11/08 18:37:42 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parser.c	8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.150 2018/08/19 23:50:27 kre Exp $");
+__RCSID("$NetBSD: parser.c,v 1.151 2018/11/08 18:37:42 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -2470,6 +2470,9 @@ expandonstack(char *ps, int lineno)
 	popfilesupto(savetopfile);
 	handler = savehandler;
 
+	if (exception == EXEXIT)
+		longjmp(handler->loc, 1);
+
 	if (result != NULL) {
 		INTON;
 	} else {

Reply via email to