summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/sort/sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/sort/sort.c b/gnu/usr.bin/sort/sort.c
index 9457e94c9f8c..1faee4242e94 100644
--- a/gnu/usr.bin/sort/sort.c
+++ b/gnu/usr.bin/sort/sort.c
@@ -369,7 +369,7 @@ xtmpfopen (const char *file)
FILE *fp;
int fd;
- fd = open (file, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+ fd = open (file, O_EXCL | O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (fd < 0 || (fp = fdopen (fd, "w")) == NULL)
{
error (0, errno, "%s", file);