Skip to content

Commit

Permalink
Merge branch 'master' into delete-opened-file
Browse files Browse the repository at this point in the history
  • Loading branch information
kolyshkin committed May 19, 2019
2 parents 46c5bfc + 1485a34 commit 211a9dd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Expand Up @@ -3,29 +3,35 @@ language: go

go:
- "stable"
- "1.10.4"
- "1.11.x"
- "1.10.x"
- "1.9.x"
- "1.8.x"

matrix:
include:
- go: "stable"
env: GOLINT=true
allow_failures:
- go: tip
fast_finish: true

before_script:
- go get -u golang.org/x/lint/golint

before_install:
- if [ ! -z "${GOLINT}" ]; then go get -u golang.org/x/lint/golint; fi

script:
- go test --race ./...

after_script:
- test -z "$(gofmt -s -l -w . | tee /dev/stderr)"
- test -z "$(golint ./... | tee /dev/stderr)"
- if [ ! -z "${GOLINT}" ]; then echo running golint; golint --set_exit_status ./...; else echo skipping golint; fi
- go vet ./...

os:
- linux
- osx
- windows

notifications:
email: false
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -14,7 +14,7 @@ Cross platform: Windows, Linux, BSD and macOS.
|----------|----------|----------|
|inotify |Linux 2.6.27 or later, Android\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)|
|kqueue |BSD, macOS, iOS\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)|
|ReadDirectoryChangesW|Windows|Supported [![Build status](https://ci.appveyor.com/api/projects/status/ivwjubaih4r0udeh/branch/master?svg=true)](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)|
|ReadDirectoryChangesW|Windows|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)|
|FSEvents |macOS |[Planned](https://github.com/fsnotify/fsnotify/issues/11)|
|FEN |Solaris 11 |[In Progress](https://github.com/fsnotify/fsnotify/issues/12)|
|fanotify |Linux 2.6.37+ | |
Expand Down
4 changes: 3 additions & 1 deletion fsnotify.go
Expand Up @@ -63,4 +63,6 @@ func (e Event) String() string {
}

// Common errors that can be reported by a watcher
var ErrEventOverflow = errors.New("fsnotify queue overflow")
var (
ErrEventOverflow = errors.New("fsnotify queue overflow")
)
4 changes: 2 additions & 2 deletions inotify_poller.go
Expand Up @@ -40,12 +40,12 @@ func newFdPoller(fd int) (*fdPoller, error) {
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
}
Expand Down

0 comments on commit 211a9dd

Please sign in to comment.