]>
go.fuhry.dev Git - fsnotify.git/log
Tom Payne [Tue, 21 Mar 2017 12:55:22 +0000 (13:55 +0100)]
Watch.Add improvements (avoid race, fix consistency, reduce garbage) (#189)
* hold mutex for longer to avoid race condition
If Watcher.Add is called with the same name from multiple goroutines and
name is not already in the watches map then the last call to complete
wins and the watch created by the first call to complete is lost.
This commit holds the mutex for the full duration of the update to the
watches map.
* avoid clobbering existing flags if inotify_add_watch fails
Previously, the watch entry is the watches map was updated before the
call to InotifyAddWatch. If InotifyAddWatch fails then this left the
watch entry in an inconsistent state.
* reuse existing watch entry when possible
Nathan Youngman [Tue, 16 Aug 2016 05:19:40 +0000 (23:19 -0600)]
travis: update for Go 1.8
two most recent stable versions + tip
Vahe Khachikyan [Wed, 2 Nov 2016 19:13:10 +0000 (15:13 -0400)]
Moved FAQ into the README
closes #186
ref #129
[ci skip]
Nickolai Zeldovich [Wed, 26 Oct 2016 20:31:22 +0000 (16:31 -0400)]
Properly handle inotify's IN_Q_OVERFLOW event (#149)
* Properly handle inotify's IN_Q_OVERFLOW event
Upon receiving an event with IN_Q_OVERFLOW set in the mask, generate an
error on the Errors chan, so that the application can take appropriate
action.
* Use a well-defined error (ErrEventOverflow) for inotify overflow
* Add a test for inotify queue overflow
Nathan Youngman [Thu, 13 Oct 2016 01:22:19 +0000 (19:22 -0600)]
replace references to OS X with macOS
[ci skip]
Nathan Youngman [Tue, 11 Oct 2016 02:33:12 +0000 (20:33 -0600)]
v1.4.2
Nathan Youngman [Tue, 11 Oct 2016 02:25:47 +0000 (20:25 -0600)]
pull request and issue template (#179)
* editor config sets 4 spaces per tab
via https://github.com/isaacs/github/issues/170#issuecomment-
181814560
[ci skip]
* pull request and issue templates
https://help.github.com/articles/helping-people-contribute-to-your-project/
[ci skip]
* issue template: provide commands to get OS version
suggested by @mdlayher
[ci skip]
Patrick [Tue, 11 Oct 2016 02:24:00 +0000 (19:24 -0700)]
Create inotify fd with close-on-exec (#178)
* Create inotify fd with close-on-exec
* switch to unix.IN_CLOEXEC
Nathan Youngman [Wed, 5 Oct 2016 04:06:20 +0000 (22:06 -0600)]
v1.4.1
Patrick [Wed, 5 Oct 2016 03:39:39 +0000 (20:39 -0700)]
deflake inotify stress test (#177)
* deflake inotify stress test
* tab -> space
* add sleep between creation / deletion to ensure creation events are triggered.
Patrick [Wed, 5 Oct 2016 02:09:41 +0000 (19:09 -0700)]
rm go1.5.4 from travis config since the linter doesn't build in 1.5 (#175)
Nathan Youngman [Sun, 2 Oct 2016 05:17:20 +0000 (23:17 -0600)]
readme: remove gocover.io badge
[ci skip]
Nathan Youngman [Sun, 2 Oct 2016 05:09:12 +0000 (23:09 -0600)]
update link to contributing to external git repos
[ci skip]
Nathan Youngman [Sun, 2 Oct 2016 04:59:51 +0000 (22:59 -0600)]
v1.4.0
Nathan Youngman [Sun, 2 Oct 2016 04:55:20 +0000 (22:55 -0600)]
add @oozie to AUTHORS
[ci skip]
Slawek Ligus [Sun, 2 Oct 2016 02:20:31 +0000 (19:20 -0700)]
Add a String() func to Event.Op (#165)
* Add a String() method to Event.Op
closes #84
* Covering all 5 Op types by the test
Bjørn Erik Pedersen [Tue, 16 Aug 2016 05:15:41 +0000 (07:15 +0200)]
Bump Travis to Go 1.6.3 (#156)
Nathan Youngman [Wed, 29 Jun 2016 01:11:04 +0000 (19:11 -0600)]
v1.3.1
Bruno Bigras [Tue, 28 Jun 2016 16:53:20 +0000 (12:53 -0400)]
Use filepath.Join() (#153)
fix #151
Riku Voipio [Tue, 12 Apr 2016 13:37:56 +0000 (16:37 +0300)]
global: switch to x/sys/unix
The syscall package is locked since 1.4[1], all new changes are in x/sys[2]
The fixes for epoll/arm64 are going to be loaded to x/sys/unix. This
commit is straightforward search/replace with a couple of hand edits.
This is needed for fixing #130
[1] https://golang.org/s/go1.4-syscall
[2] https://godoc.org/golang.org/x/sys/unix
closes #135
Bjørn Erik Pedersen [Wed, 13 Apr 2016 22:32:47 +0000 (00:32 +0200)]
Update Travis config to Go 1.5.4 and 1.6.1
Amit Krishnan [Thu, 10 Mar 2016 01:19:56 +0000 (17:19 -0800)]
Get fsnotify to build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
closes #128
Bjørn Erik Pedersen [Fri, 4 Mar 2016 17:03:19 +0000 (18:03 +0100)]
Add more Go versions to Travis config
Bjørn Erik Pedersen [Fri, 4 Mar 2016 16:57:45 +0000 (17:57 +0100)]
Append missing email address in AUTHORS
Nathan Youngman [Thu, 3 Mar 2016 04:06:04 +0000 (21:06 -0700)]
add Bjørn to authors
Nathan Youngman [Thu, 3 Mar 2016 03:54:07 +0000 (20:54 -0700)]
update authors
Nathan Youngman [Thu, 3 Mar 2016 03:51:59 +0000 (20:51 -0700)]
fix spelling error
thanks to Go Report Card
https://goreportcard.com/report/github.com/fsnotify/fsnotify
Tiffany Jernigan [Tue, 23 Feb 2016 07:14:36 +0000 (23:14 -0800)]
Fix golint errors in windows.go for #116
closes #121
fixes #116
Nathan Youngman [Thu, 18 Feb 2016 16:53:03 +0000 (09:53 -0700)]
rename organization to fsnotify
ref #108
Bjørn Erik Pedersen [Sun, 10 Jan 2016 15:04:37 +0000 (16:04 +0100)]
kqueue: fix Remove-logic
`os.Lstat` does not return `error` when a file/directory exists,
so the code path to check for newly created files after a REMOVE
on BSD was never executed.
Also, if the watched entry is a file, it has been removed from the watcher, so do a new-file-check for them as well.
This commit fixes issues on TextMate on OS X and others that uses `exchangedata` to do atomic saves.
See #17. closes #111.
Nathan Youngman [Thu, 17 Dec 2015 18:48:24 +0000 (11:48 -0700)]
v1.2.8
Nathan Youngman [Thu, 17 Dec 2015 03:04:41 +0000 (20:04 -0700)]
Add race detection on Travis CI.
thanks to @ppknap for the suggestion
Pawel Knap [Wed, 25 Nov 2015 23:22:45 +0000 (00:22 +0100)]
kqueue: fix race condition in Close
fixes #99
closes #105
thanks to @djui for reporting the issue and @ppknap for writing a test.
Add test for concurrent file removes and watcher.Close calls
Nathan Youngman [Thu, 17 Dec 2015 04:41:17 +0000 (21:41 -0700)]
inotify: fix race in test
Daniel Wagner-Hall [Tue, 17 Nov 2015 06:24:26 +0000 (01:24 -0500)]
kqueue: avoid infinite loops from symlinks cycles
The semenatics of using kqueue are already slightly different than
inotify, specifically that inotify will give you events for the symlink
itself whereas kqueue will only give events for the target of the
symlink. This preserves that behaviour, that symlinks don't get notified
on, but ensures that circular symlinks don't recurse forever.
This change pushes the resolved filename up through the stack so that
the fileExists map can be properly populated; not doing so would mean
that deleting a cyclical symlink and then replacing it with a file of
the same name would not notify for that file's creation (or subsequent
events) because we would believe that the file already existed.
Nathan Youngman [Tue, 17 Nov 2015 21:21:40 +0000 (14:21 -0700)]
v1.2.4
铁哥 [Tue, 30 Jun 2015 06:22:22 +0000 (14:22 +0800)]
kqueue: watch for rename events on subdirectories
if flags has no syscall.NOTE_RENAME, subdir rename event will not notify.
closes #83
Ken-ichirou MATSUZAWA [Thu, 12 Mar 2015 05:09:56 +0000 (14:09 +0900)]
inotify: sync Watcher with underlying inotify with IN_IGNORE
Watcher.watches and paths are not deleted when entry was removed automatically. Deleting those entry at ignoreLinux() to fix it.
This changes removing invalid watch name, it (should) always return "can't remove non-existent..."
closes #73
Riku Voipio [Mon, 2 Nov 2015 19:39:13 +0000 (21:39 +0200)]
inotify: switch to epoll_create1
Epoll_create was replaced with epoll_create1 in linux 2.6.27. The older
syscall isn't available on new architectures (such as arm64).
closes #100
Nathan Youngman [Wed, 14 Oct 2015 23:43:03 +0000 (17:43 -0600)]
v1.2.1
Nathan Youngman [Wed, 14 Oct 2015 23:02:39 +0000 (17:02 -0600)]
documentation before coverage
[skip ci]
Nathan Youngman [Wed, 14 Oct 2015 22:54:23 +0000 (16:54 -0600)]
remove CircleCI for OS X tests
TravisCI handles it
Nathan Youngman [Wed, 14 Oct 2015 22:49:57 +0000 (16:49 -0600)]
TravisCI update
Evan Phoenix [Wed, 14 Oct 2015 17:50:51 +0000 (10:50 -0700)]
Don't watch named pipes
You can't watch a named pipe, same as a socket. The call to `Open` will just hang forever.
closes #98
Nathan Youngman [Wed, 8 Apr 2015 17:51:48 +0000 (11:51 -0600)]
add related projects to Readme
by @rjeczalik and @samjacobson
Nathan Youngman [Sun, 8 Feb 2015 20:29:58 +0000 (13:29 -0700)]
v1.2.0
closes #66 (apply mail)
Pieter Droogendijk [Sun, 8 Feb 2015 02:50:54 +0000 (03:50 +0100)]
When removing, delete from watches before removing from inotify (fixes go-fsnotify/fsnotify#40)
Pieter Droogendijk [Sun, 8 Feb 2015 01:36:05 +0000 (02:36 +0100)]
Add stressy test to inotify.
Pieter Droogendijk [Sun, 8 Feb 2015 01:34:12 +0000 (02:34 +0100)]
Make wakeup pipe non-blocking
Pieter Droogendijk [Sun, 8 Feb 2015 00:36:12 +0000 (01:36 +0100)]
Reduce repeated error code in inotify
Pieter Droogendijk [Sat, 7 Feb 2015 23:34:02 +0000 (00:34 +0100)]
Minor doc and test typos
Pieter Droogendijk [Sat, 7 Feb 2015 23:29:08 +0000 (00:29 +0100)]
Fix fdPoller.close to only close when fds have been assigned
Pieter Droogendijk [Sat, 7 Feb 2015 23:24:29 +0000 (00:24 +0100)]
Properly clean fds when newFdPoller fails
Pieter Droogendijk [Sat, 7 Feb 2015 23:16:57 +0000 (00:16 +0100)]
Clean up closing file descriptors in newFdPoller
Pieter Droogendijk [Sat, 7 Feb 2015 23:08:01 +0000 (00:08 +0100)]
Renamed two misnamed things
Pieter Droogendijk [Sat, 7 Feb 2015 23:05:53 +0000 (00:05 +0100)]
Add some unit tests for inotify_poller
Pieter Droogendijk [Sat, 7 Feb 2015 21:39:58 +0000 (22:39 +0100)]
Close inotify fd from watcher, not from poller
Pieter Droogendijk [Sat, 7 Feb 2015 21:23:17 +0000 (22:23 +0100)]
Comment about the buffer size to epoll_wait
Pieter Droogendijk [Sat, 7 Feb 2015 21:18:46 +0000 (22:18 +0100)]
Generate inotify fd in NewWatcher, pass fd into newFdPoller
Pieter Droogendijk [Sat, 7 Feb 2015 21:10:39 +0000 (22:10 +0100)]
Remove NewSyscallError
Pieter Droogendijk [Sat, 7 Feb 2015 19:47:41 +0000 (20:47 +0100)]
Now use epoll so we can wake up readEvents
Nathan Youngman [Sat, 7 Feb 2015 18:10:00 +0000 (11:10 -0700)]
kqueue: wait to close kqueue until after removing watches
sending done would close w.kq before Remove had a chance to remove the watches with EV_DELETE, resulting in a file handle leak.
ref #59
also make Close() report the first error returned by Remove and continue.
closes #65
Pieter Droogendijk [Fri, 6 Feb 2015 01:47:13 +0000 (02:47 +0100)]
inotify: closing watcher should now always shut down goroutine
(fixes #3)
closes #63
Pieter Droogendijk [Thu, 5 Feb 2015 21:19:17 +0000 (22:19 +0100)]
inotify: Retry read on EINTR
closes #62
Nathan Youngman [Tue, 3 Feb 2015 20:42:50 +0000 (13:42 -0700)]
Go 1.4.1 multi-os build on Travis CI
closes #60
Nathan Youngman [Sun, 4 Jan 2015 00:26:17 +0000 (17:26 -0700)]
Merge pull request #57 from go-fsnotify/ci
setup CircleCI to test on OS X
Nathan Youngman [Sat, 3 Jan 2015 01:38:45 +0000 (18:38 -0700)]
Setup CircleCI to test on OS X.
With help from @z00b.
Nathan Youngman [Thu, 1 Jan 2015 03:28:30 +0000 (20:28 -0700)]
readme: add USN journals to maybe list
Nathan Youngman [Thu, 1 Jan 2015 03:24:48 +0000 (20:24 -0700)]
add v0.9.3 backport to changelog
Nathan Youngman [Thu, 1 Jan 2015 02:59:35 +0000 (19:59 -0700)]
changelog: fix link
Nathan Youngman [Thu, 1 Jan 2015 02:48:26 +0000 (19:48 -0700)]
updates to CONTRIBUTING
[ci skip]
Nathan Youngman [Wed, 31 Dec 2014 03:32:53 +0000 (20:32 -0700)]
add gofmt check to Travis CI
Nathan Youngman [Wed, 31 Dec 2014 03:06:24 +0000 (20:06 -0700)]
Merge pull request #56 from go-fsnotify/ci
CI
Nathan Youngman [Wed, 31 Dec 2014 02:51:32 +0000 (19:51 -0700)]
AppVeyor badge for Windows CI
Nathan Youngman [Wed, 31 Dec 2014 02:17:50 +0000 (19:17 -0700)]
Travis CI badge on Linux.
Nathan Youngman [Wed, 31 Dec 2014 02:04:11 +0000 (19:04 -0700)]
try Travis CI with docker containers
Nathan Youngman [Sat, 13 Dec 2014 06:17:38 +0000 (23:17 -0700)]
v1.1.0 focus on kqueue
Nathan Youngman [Sat, 13 Dec 2014 06:15:00 +0000 (23:15 -0700)]
kqueue: cleanup internal watch before sending remove event
#51 if the calling code were to Add the same file again it sometimes would result in a bad file descriptor (thought it was alreadyWatching)
Nathan Youngman [Sat, 13 Dec 2014 04:47:51 +0000 (21:47 -0700)]
kqueue: addWatch sometimes just watches deletions
fix regression #48
When watching a directory with kqueue, fsnotify will watch all the files in it. This includes subdirectories, but it only watches for the subdirectory being deleted. This is to emulate the behavior of inotify on Linux.
A bug in
4a0d1ae9df8c61fb8912829fc714f189358a3dc7 resulted in it watching that subdirectory for all events, so watching a single directory would result in more events than expected.
Matt Layher [Sun, 16 Nov 2014 02:36:10 +0000 (21:36 -0500)]
More efficient string concatenation for Event.String()
closes #52
Nathan Youngman [Sat, 15 Nov 2014 02:48:16 +0000 (19:48 -0700)]
CONTRIBUTING update
information for maintainers
Nathan Youngman [Fri, 14 Nov 2014 04:03:46 +0000 (21:03 -0700)]
Go 1.3+ required.
#50
Nathan Youngman [Wed, 24 Sep 2014 21:47:39 +0000 (15:47 -0600)]
readme: test against master
Nathan Youngman [Wed, 24 Sep 2014 21:41:13 +0000 (15:41 -0600)]
update changelog (dev)
rework kqueue internals
closes #13
closes #43
Nathan Youngman [Wed, 24 Sep 2014 18:56:27 +0000 (12:56 -0600)]
kqueue: remove calls to os.NewSyscallError
calling os.NewSyscallError would silently break comparisons with the syscall constants. it didn't really add much value either, besides the "Kevent" prefix.
http://play.golang.org/p/YKbmygNDu4
Nathan Youngman [Sun, 14 Sep 2014 23:58:38 +0000 (17:58 -0600)]
kqueue: less mutexes
closes #13
Nathan Youngman [Sun, 14 Sep 2014 23:40:15 +0000 (17:40 -0600)]
FIXME: something doesn't seem quite right
Ref: https://github.com/go-fsnotify/fsnotify/blob/v0.9.0/fsnotify_bsd.go#L384
Nathan Youngman [Sun, 14 Sep 2014 23:08:14 +0000 (17:08 -0600)]
kqueue: pathInfo struct containing name and isDir
we don't use fileInfo for anything but IsDir
Nathan Youngman [Sun, 14 Sep 2014 22:01:22 +0000 (16:01 -0600)]
kqueue: split off newCreateEvent
more clear.
Nathan Youngman [Sun, 14 Sep 2014 19:55:35 +0000 (13:55 -0600)]
kqueue: only need to store flags on directories
Nathan Youngman [Sun, 14 Sep 2014 17:06:34 +0000 (11:06 -0600)]
kqueue: done can be an unbuffered channel
Nathan Youngman [Sun, 14 Sep 2014 16:54:43 +0000 (10:54 -0600)]
add low-level kqueue functions
to separate out that functionality
Nathan Youngman [Mon, 8 Sep 2014 03:51:07 +0000 (21:51 -0600)]
add dragonfly bsd to the build tags
Nathan Youngman [Mon, 8 Sep 2014 03:46:41 +0000 (21:46 -0600)]
rename to inotify.go
Nathan Youngman [Mon, 8 Sep 2014 03:40:39 +0000 (21:40 -0600)]
put linux and windows build tags back
this reverts
30aab4aea324d0110394bb280d9bb128a9716dcb
Nathan Youngman [Mon, 8 Sep 2014 03:29:45 +0000 (21:29 -0600)]
rearrange code so exported APIs are at the top
Nathan Youngman [Mon, 8 Sep 2014 02:20:32 +0000 (20:20 -0600)]
code organization: rename files
Hopefully more clear.
Nathan Youngman [Mon, 8 Sep 2014 02:14:15 +0000 (20:14 -0600)]
merge integration tests into one file
Already have some tests using runtime.GOOS, might as well be consistient.
Yukang [Thu, 28 Aug 2014 11:07:42 +0000 (19:07 +0800)]
add done channal flag, keep waiting for the go loop func
closes #37
Nathan Youngman [Wed, 20 Aug 2014 03:04:42 +0000 (21:04 -0600)]
Windows MOVED_TO now translates to Create like on BSD and Linux.
closes #36
ref #26