diff options
Diffstat (limited to 'toys/other/truncate.c')
-rw-r--r-- | toys/other/truncate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/truncate.c b/toys/other/truncate.c index 123ae553..d09818f3 100644 --- a/toys/other/truncate.c +++ b/toys/other/truncate.c @@ -35,6 +35,6 @@ void truncate_main(void) // Create files with mask rwrwrw. // Nonexistent files are only an error if we're supposed to create them. - loopfiles_rw(toys.optargs, O_WRONLY|(cr ? O_CREAT : 0), 0666, cr, + loopfiles_rw(toys.optargs, O_WRONLY|O_CLOEXEC|(cr ? O_CREAT : 0), 0666, cr, do_truncate); } |