summaryrefslogtreecommitdiffhomepage
path: root/coreutils/truncate.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/truncate.c')
-rw-r--r--coreutils/truncate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/truncate.c b/coreutils/truncate.c
index 4c997bf7a..8d845f218 100644
--- a/coreutils/truncate.c
+++ b/coreutils/truncate.c
@@ -40,7 +40,7 @@ int truncate_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int truncate_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opts;
- int flags = O_RDWR;
+ int flags = O_WRONLY | O_NONBLOCK;
int ret = EXIT_SUCCESS;
char *size_str;
off_t size;