aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c8
-rw-r--r--shell/ash_test/ash-misc/tickquote1.right1
-rwxr-xr-xshell/ash_test/ash-misc/tickquote1.tests1
3 files changed, 3 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 4c01e67d4..6627cec9b 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -10473,7 +10473,6 @@ struct heredoc {
10473}; 10473};
10474 10474
10475static smallint tokpushback; /* last token pushed back */ 10475static smallint tokpushback; /* last token pushed back */
10476static smallint parsebackquote; /* nonzero if we are inside backquotes */
10477static smallint quoteflag; /* set if (part of) last token was quoted */ 10476static smallint quoteflag; /* set if (part of) last token was quoted */
10478static token_id_t lasttoken; /* last token read (integer id Txxx) */ 10477static token_id_t lasttoken; /* last token read (integer id Txxx) */
10479static struct heredoc *heredoclist; /* list of here documents to read */ 10478static struct heredoc *heredoclist; /* list of here documents to read */
@@ -11313,7 +11312,7 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
11313 if (syntax == ARISYNTAX) 11312 if (syntax == ARISYNTAX)
11314 raise_error_syntax("missing '))'"); 11313 raise_error_syntax("missing '))'");
11315#endif 11314#endif
11316 if (syntax != BASESYNTAX && !parsebackquote && eofmark == NULL) 11315 if (syntax != BASESYNTAX && eofmark == NULL)
11317 raise_error_syntax("unterminated quoted string"); 11316 raise_error_syntax("unterminated quoted string");
11318 if (varnest != 0) { 11317 if (varnest != 0) {
11319 startlinno = g_parsefile->linno; 11318 startlinno = g_parsefile->linno;
@@ -11609,7 +11608,6 @@ parsesub: {
11609 */ 11608 */
11610parsebackq: { 11609parsebackq: {
11611 struct nodelist **nlpp; 11610 struct nodelist **nlpp;
11612 smallint savepbq;
11613 union node *n; 11611 union node *n;
11614 char *volatile str; 11612 char *volatile str;
11615 struct jmploc jmploc; 11613 struct jmploc jmploc;
@@ -11620,10 +11618,8 @@ parsebackq: {
11620#ifdef __GNUC__ 11618#ifdef __GNUC__
11621 (void) &saveprompt; 11619 (void) &saveprompt;
11622#endif 11620#endif
11623 savepbq = parsebackquote;
11624 if (setjmp(jmploc.loc)) { 11621 if (setjmp(jmploc.loc)) {
11625 free(str); 11622 free(str);
11626 parsebackquote = 0;
11627 exception_handler = savehandler; 11623 exception_handler = savehandler;
11628 longjmp(exception_handler->loc, 1); 11624 longjmp(exception_handler->loc, 1);
11629 } 11625 }
@@ -11707,7 +11703,6 @@ parsebackq: {
11707 nlpp = &(*nlpp)->next; 11703 nlpp = &(*nlpp)->next;
11708 *nlpp = stzalloc(sizeof(**nlpp)); 11704 *nlpp = stzalloc(sizeof(**nlpp));
11709 /* (*nlpp)->next = NULL; - stzalloc did it */ 11705 /* (*nlpp)->next = NULL; - stzalloc did it */
11710 parsebackquote = oldstyle;
11711 11706
11712 if (oldstyle) { 11707 if (oldstyle) {
11713 saveprompt = doprompt; 11708 saveprompt = doprompt;
@@ -11741,7 +11736,6 @@ parsebackq: {
11741 str = NULL; 11736 str = NULL;
11742 INT_ON; 11737 INT_ON;
11743 } 11738 }
11744 parsebackquote = savepbq;
11745 exception_handler = savehandler; 11739 exception_handler = savehandler;
11746 USTPUTC(CTLBACKQ, out); 11740 USTPUTC(CTLBACKQ, out);
11747 if (oldstyle) 11741 if (oldstyle)
diff --git a/shell/ash_test/ash-misc/tickquote1.right b/shell/ash_test/ash-misc/tickquote1.right
new file mode 100644
index 000000000..2e661bfe3
--- /dev/null
+++ b/shell/ash_test/ash-misc/tickquote1.right
@@ -0,0 +1 @@
./tickquote1.tests: line 1: syntax error: unterminated quoted string
diff --git a/shell/ash_test/ash-misc/tickquote1.tests b/shell/ash_test/ash-misc/tickquote1.tests
new file mode 100755
index 000000000..90d5bbc9b
--- /dev/null
+++ b/shell/ash_test/ash-misc/tickquote1.tests
@@ -0,0 +1 @@
echo `"pwd`