← Commit list

da75f4484

Andreas Bühmann
Andreas Bühmann
2010-06-24
FAILED Duration: 35s

Subject

ash: <> redir should not truncate

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+1 -1
@@ -4938,7 +4938,7 @@ openredirect(union node *redir)
break;
case NFROMTO:
fname = redir->nfile.expfname;
- f = open(fname, O_RDWR|O_CREAT|O_TRUNC, 0666);
+ f = open(fname, O_RDWR|O_CREAT, 0666);
if (f < 0)
goto ecreate;
break;
shell/ash_test/ash-redir/redir9.right+2 -0
@@ -0,0 +1,2 @@
+Ok
+Done:0
shell/ash_test/ash-redir/redir9.tests+4 -0
@@ -0,0 +1,4 @@
+echo Ok >file.tmp
+cat 0<>file.tmp
+echo Done:$?
+rm file.tmp