FreeBSD Bugzilla – Attachment 181 Details for
Bug 880
Incorrect parsing of command lists by /bin/sh
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.32 KB, created by
nnd
on 1995-12-09 17:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
nnd
Created:
1995-12-09 17:50:01 UTC
Size:
1.32 KB
patch
obsolete
>--- /usr/src/bin/sh/parser.c.ORG Wed Aug 30 15:44:33 1995 >+++ /usr/src/bin/sh/parser.c Tue Dec 5 18:56:28 1995 >@@ -149,30 +149,13 @@ > n1 = andor(); > for (;;) { > switch (readtoken()) { >- case TBACKGND: >- if (n1->type == NCMD || n1->type == NPIPE) { >- n1->ncmd.backgnd = 1; >- } else if (n1->type == NREDIR) { >- n1->type = NBACKGND; >- } else { >- n3 = (union node *)stalloc(sizeof (struct nredir)); >- n3->type = NBACKGND; >- n3->nredir.n = n1; >- n3->nredir.redirect = NULL; >- n1 = n3; >- } >- goto tsemi; > case TNL: >- tokpushback++; >+ parseheredoc(); >+ if (nlflag) >+ return n1; > /* fall through */ >-tsemi: case TSEMI: >- if (readtoken() == TNL) { >- parseheredoc(); >- if (nlflag) >- return n1; >- } else { >- tokpushback++; >- } >+ case TBACKGND: >+ case TSEMI: > checkkwd = 2; > if (tokendlist[peektoken()]) > return n1; >@@ -212,6 +195,19 @@ > } else if (t == TOR) { > t = NOR; > } else { >+ if (t == TBACKGND) { >+ if (n1->type == NCMD || n1->type == NPIPE) { >+ n1->ncmd.backgnd = 1; >+ } else if (n1->type == NREDIR) { >+ n1->type = NBACKGND; >+ } else { >+ n3 = (union node *)stalloc(sizeof (struct nredir)); >+ n3->type = NBACKGND; >+ n3->nredir.n = n1; >+ n3->nredir.redirect = NULL; >+ n1 = n3; >+ } >+ } > tokpushback++; > return n1; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 880
:
180
| 181