vendor/github.com/fsnotify/fsnotify/inotify_poller.go
changeset 256 6d9efbef00a9
parent 242 2a9ec03fe5a1
child 260 445e01aede7e
--- a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go	Mon Jun 07 20:58:18 2021 +0200
+++ b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go	Sun Jul 11 10:35:56 2021 +0200
@@ -40,12 +40,12 @@
 	poller.fd = fd
 
 	// Create epoll fd
-	poller.epfd, errno = unix.EpollCreate1(0)
+	poller.epfd, errno = unix.EpollCreate1(unix.EPOLL_CLOEXEC)
 	if poller.epfd == -1 {
 		return nil, errno
 	}
 	// Create pipe; pipe[0] is the read end, pipe[1] the write end.
-	errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK)
+	errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK|unix.O_CLOEXEC)
 	if errno != nil {
 		return nil, errno
 	}