Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/mail add O_CLOEXEC
details: https://anonhg.NetBSD.org/src/rev/1f621c64f66b
branches: trunk
changeset: 952796:1f621c64f66b
user: christos <christos%NetBSD.org@localhost>
date: Wed Feb 17 21:09:39 2021 +0000
description:
add O_CLOEXEC
diffstat:
usr.bin/mail/dotlock.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 347671bdea8e -r 1f621c64f66b usr.bin/mail/dotlock.c
--- a/usr.bin/mail/dotlock.c Wed Feb 17 17:43:09 2021 +0000
+++ b/usr.bin/mail/dotlock.c Wed Feb 17 21:09:39 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dotlock.c,v 1.13 2015/07/04 22:45:08 christos Exp $ */
+/* $NetBSD: dotlock.c,v 1.14 2021/02/17 21:09:39 christos Exp $ */
/*
* Copyright (c) 1996 Christos Zoulas. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: dotlock.c,v 1.13 2015/07/04 22:45:08 christos Exp $");
+__RCSID("$NetBSD: dotlock.c,v 1.14 2021/02/17 21:09:39 christos Exp $");
#endif
#include "rcv.h"
@@ -81,7 +81,8 @@
* We try to create the unique filename.
*/
for (ntries = 0; ; ntries++) {
- fd = open(path, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_SYNC, 0);
+ fd = open(path,
+ O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_SYNC|O_CLOEXEC, 0);
if (fd != -1) {
(void)close(fd);
break;
Home |
Main Index |
Thread Index |
Old Index