summaryrefslogtreecommitdiff
path: root/scsh-process.scm
diff options
context:
space:
mode:
Diffstat (limited to 'scsh-process.scm')
-rw-r--r--scsh-process.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/scsh-process.scm b/scsh-process.scm
index c5a286c..f675a2c 100644
--- a/scsh-process.scm
+++ b/scsh-process.scm
@@ -415,9 +415,10 @@
((_ (> ?file-name)) (setup-redirection (> 1 ?file-name)))
((_ (>> ?file-name)) (setup-redirection (>> 1 ?file-name)))
((_ (> ?fd ?file-name))
- (duplicate-fileno (file-open (maybe->string `?file-name)
- (fx+ open/wronly open/creat))
- `?fd))
+ (duplicate-fileno
+ (file-open (maybe->string `?file-name)
+ (fx+ (fx+ open/wronly open/creat) open/trunc))
+ `?fd))
((_ (>> ?fd ?file-name))
(duplicate-fileno (file-open (maybe->string `?file-name)
(fx+ open/wronly (fx+ open/append open/creat)))