Skip to content

Commit

Permalink
Open files with CLOEXEC
Browse files Browse the repository at this point in the history
Fix #272
  • Loading branch information
linxiulei authored and nathany committed Oct 5, 2019
1 parent 1485a34 commit 924410f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion open_mode_bsd.go
Expand Up @@ -8,4 +8,4 @@ package fsnotify

import "golang.org/x/sys/unix"

const openMode = unix.O_NONBLOCK | unix.O_RDONLY
const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC
2 changes: 1 addition & 1 deletion open_mode_darwin.go
Expand Up @@ -9,4 +9,4 @@ package fsnotify
import "golang.org/x/sys/unix"

// note: this constant is not defined on BSD
const openMode = unix.O_EVTONLY
const openMode = unix.O_EVTONLY | unix.O_CLOEXEC

0 comments on commit 924410f

Please sign in to comment.