Module Name:    src
Committed By:   sjg
Date:           Fri Jul 10 00:42:53 UTC 2020

Modified Files:
        src/usr.bin/make/filemon: filemon_dev.c

Log Message:
filemon_dev:filemon_open need FD_CLOEXEC

We need to mark the fd for filemon FD_CLOEXEC
so that when we call filemon_close() the device is
closed and unflushed data written to our temp file.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/filemon/filemon_dev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/filemon/filemon_dev.c
diff -u src/usr.bin/make/filemon/filemon_dev.c:1.1 src/usr.bin/make/filemon/filemon_dev.c:1.2
--- src/usr.bin/make/filemon/filemon_dev.c:1.1	Sun Jan 19 19:49:37 2020
+++ src/usr.bin/make/filemon/filemon_dev.c	Fri Jul 10 00:42:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: filemon_dev.c,v 1.1 2020/01/19 19:49:37 riastradh Exp $	*/
+/*	$NetBSD: filemon_dev.c,v 1.2 2020/07/10 00:42:53 sjg Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -76,6 +76,7 @@ filemon_open(void)
 			goto fail0;
 		}
 	}
+	(void)fcntl(F->fd, F_SETFD, FD_CLOEXEC);
 
 	/* Success!  */
 	return F;

Reply via email to