summaryrefslogtreecommitdiff
path: root/usr.bin/vi/common
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2013-04-29 00:28:24 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2013-04-29 00:28:24 +0000
commit893b957ab23fe3eb2386c9acedd396606f76b5cb (patch)
treeef352fdb5afd940f9c19549bb1e8a4986357e87b /usr.bin/vi/common
parent8656f10462f9b7ede2d214dc09969c2fa153b626 (diff)
use FD_CLOEXEC instead of 1; from David Hill
ok otto
Diffstat (limited to 'usr.bin/vi/common')
-rw-r--r--usr.bin/vi/common/exf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vi/common/exf.c b/usr.bin/vi/common/exf.c
index 802debd2cc1..62259b72d07 100644
--- a/usr.bin/vi/common/exf.c
+++ b/usr.bin/vi/common/exf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exf.c,v 1.26 2011/07/10 13:20:25 millert Exp $ */
+/* $OpenBSD: exf.c,v 1.27 2013/04/29 00:28:23 okan Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -1457,7 +1457,7 @@ file_lock(sp, name, fdp, fd, iswrite)
return (LOCK_SUCCESS);
/* Set close-on-exec flag so locks are not inherited by shell cmd. */
- if (fcntl(fd, F_SETFD, 1) == -1)
+ if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
msgq_str(sp, M_SYSERR, name, "%s");
#ifdef HAVE_LOCK_FLOCK /* Hurrah! We've got flock(2). */