also do not, ever, use &> bashiop in lksh

This commit is contained in:
tg
2013-03-29 17:33:56 +00:00
parent 41ae60bb55
commit ea657bd4d9
3 changed files with 41 additions and 18 deletions

9
lex.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.183 2013/03/24 15:01:48 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.184 2013/03/29 17:33:55 tg Exp $");
/*
* states while lexing word
@ -898,8 +898,11 @@ yylex(int cf)
state = SBASE;
dp = Xstring(ws, wp);
if (state == SBASE && (c == '<' || c == '>' ||
(!Flag(FSH) && !Flag(FPOSIX) && c == '&'))) {
if (state == SBASE && (
#ifndef MKSH_LEGACY_MODE
(c == '&' && !Flag(FSH) && !Flag(FPOSIX)) ||
#endif
c == '<' || c == '>')) {
struct ioword *iop = alloc(sizeof(struct ioword), ATEMP);
if (Xlength(ws, wp) == 0)