Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man4 Minor cleanup in example code - use FD_CLOEXE...
details: https://anonhg.NetBSD.org/src/rev/35e523b4756d
branches: trunk
changeset: 341722:35e523b4756d
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Fri Nov 20 00:40:18 2015 +0000
description:
Minor cleanup in example code - use FD_CLOEXEC instead of magic number
diffstat:
share/man/man4/filemon.4 | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 1baeee22393d -r 35e523b4756d share/man/man4/filemon.4
--- a/share/man/man4/filemon.4 Thu Nov 19 22:26:48 2015 +0000
+++ b/share/man/man4/filemon.4 Fri Nov 20 00:40:18 2015 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: filemon.4,v 1.8 2012/04/21 12:27:28 roy Exp $
+.\" $NetBSD: filemon.4,v 1.9 2015/11/20 00:40:18 pgoyette Exp $
.\"
.\" Copyright (c) 2011, Juniper Networks, Inc.
.\"
@@ -23,7 +23,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd April 5, 2012
+.Dd November 20, 2015
.Dt FILEMON 4
.Os
.Sh NAME
@@ -150,8 +150,8 @@
/* give filemon the temp file to use */
ioctl(filemon_fd, FILEMON_SET_FD, &temp_fd);
/* children do not need these once they exec */
-fcntl(filemon_fd, F_SETFD, 1);
-fcntl(temp_fd, F_SETFD, 1);
+fcntl(filemon_fd, F_SETFD, FD_CLOEXEC);
+fcntl(temp_fd, F_SETFD, FD_CLOEXEC);
pid = fork();
switch(pid) {
Home |
Main Index |
Thread Index |
Old Index