← Commit list

d0fff9155

Denys Vlasenko
Denys Vlasenko
2017-07-31
SUCCESS Duration: 141s

Subject

ash: fix display of ">&-" redirect in job strings

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+8 -1
@@ -4642,6 +4642,10 @@ cmdputs(const char *s)
/* These can only happen inside quotes */
cc[0] = c;
str = cc;
+//FIXME:
+// $ true $$ &
+// $ <cr>
+// [1]+ Done true ${\$} <<=== BUG: ${\$} is not a valid way to write $$ (${$} would be ok)
c = '\\';
break;
default:
@@ -4823,7 +4827,10 @@ cmdtxt(union node *n)
cmdputs(utoa(n->nfile.fd));
cmdputs(p);
if (n->type == NTOFD || n->type == NFROMFD) {
- cmdputs(utoa(n->ndup.dupfd));
+ if (n->ndup.dupfd >= 0)
+ cmdputs(utoa(n->ndup.dupfd));
+ else
+ cmdputs("-");
break;
}
n = n->nfile.fname;