summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/parser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c
index 9e86162..8dd1e7a 100644
--- a/bin/sh/parser.c
+++ b/bin/sh/parser.c
@@ -1308,11 +1308,16 @@ parsebackq: {
struct jmploc *const savehandler = handler;
int savelen;
int saveprompt;
+ const int bq_startlinno = plinno;
if (setjmp(jmploc.loc)) {
if (str)
ckfree(str);
handler = savehandler;
+ if (exception == EXERROR) {
+ startlinno = bq_startlinno;
+ synerror("Error in command substitution");
+ }
longjmp(handler->loc, 1);
}
INTOFF;
OpenPOWER on IntegriCloud