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