Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh Allow shells forked to run command substitutions whil...



details:   https://anonhg.NetBSD.org/src/rev/49eed6fe9d5a
branches:  trunk
changeset: 445681:49eed6fe9d5a
user:      kre <kre%NetBSD.org@localhost>
date:      Thu Nov 08 18:37:42 2018 +0000

description:
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.

diffstat:

 bin/sh/parser.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r bf3004370351 -r 49eed6fe9d5a bin/sh/parser.c
--- a/bin/sh/parser.c   Thu Nov 08 18:19:37 2018 +0000
+++ b/bin/sh/parser.c   Thu Nov 08 18:37:42 2018 +0000
@@ -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 @@
        popfilesupto(savetopfile);
        handler = savehandler;
 
+       if (exception == EXEXIT)
+               longjmp(handler->loc, 1);
+
        if (result != NULL) {
                INTON;
        } else {



Home | Main Index | Thread Index | Old Index