diff options
author | jilles <jilles@FreeBSD.org> | 2013-08-14 19:34:13 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-08-14 19:34:13 +0000 |
commit | 79360f25fc862bef26d62d9fd2ec20d0de41756e (patch) | |
tree | 62ccfcc3c8d54aa063ad08d8afd4497008271b6c /bin/sh | |
parent | 521440b2991bdc998552fdaf12e9ba82e5c9c053 (diff) | |
download | FreeBSD-src-79360f25fc862bef26d62d9fd2ec20d0de41756e.zip FreeBSD-src-79360f25fc862bef26d62d9fd2ec20d0de41756e.tar.gz |
sh: Allow a lone redirection before '|', ';;' or ';&'.
Example: </dev/null | :
PR: 181240
MFC after: 1 week
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c index f079c69c..ec15f58 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -577,6 +577,9 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : "")); case TSEMI: case TAND: case TOR: + case TPIPE: + case TENDCASE: + case TFALLTHRU: /* * An empty command before a ; doesn't make much sense, and * should certainly be disallowed in the case of `if ;'. |