Nino Khodabandeh
26dc82c746
Wait for done chan first before Cleanup
2016-04-26 12:23:22 -07:00
Nino Khodabandeh
308ca46680
This Change includes:
...
- Fixes Flaky test, some tests do not require call to tail.Stop()
- Changes inadequate names
2016-04-26 11:30:20 -07:00
Nino Khodabandeh
04356b27e1
Merge branch 'davidsansome-block-until-exists-relative-path'
2016-04-26 10:57:50 -07:00
Nino Khodabandeh
425bce90fd
Merge branch 'block-until-exists-relative-path' of https://github.com/davidsansome/tail into davidsansome-block-until-exists-relative-path
2016-04-26 10:56:05 -07:00
miraclesu
b2940955ab
fix reader nil pointer
2016-04-14 17:05:39 -07:00
Nino Khodabandeh
adca23eea0
Merge pull request #76 from aristanetworks/upstream
...
Fix deadlock when watching files with inotify
2016-04-08 16:33:03 -07:00
Benoit Sigoure
5e2d004af5
watch: Fix prototype to be more restrictive.
...
Change-Id: Ic744312efa91cf5c2dc2810e597353a080dccb70
2016-04-08 16:29:40 -07:00
Benoit Sigoure
ac5972aca8
watch: Unsubscribe from fsnotify synchronously.
...
Calling watcher.Remove() from the run() goroutine is now problematic,
because with the change made in fsnotify/fsnotify#73 Remove() can now
take an arbitrary amount of time, which means we can deadlock if run()
is waiting for fsnotify to acknowledge the removal and fsnotify is
trying to send an unrelated Event.
So instead we now do part of the cleanup, including calling Remove(),
synchronously, in the goroutine trying to unsubscribe.
This fixes #75 . Thanks to Aaron Beitch for the fix.
Change-Id: I346c9eecc34b2378312b07b3c3efc41616b95380
2016-04-08 16:29:40 -07:00
Mark Yen
f4e2250826
Merge pull request #81 from hpcloud/fix-race-in-test
...
Fixes race in test
2016-04-08 12:58:07 -07:00
Nino Khodabandeh
b58ee27c66
Fixes race in test
...
- Enabled race flag in the make file to alway run with -race locally
- Moved polling interval into TestMain to avoid race
2016-04-08 11:47:25 -07:00
Mark Yen
3b00e857b6
Merge pull request #80 from hpcloud/v2-criteria
...
Support golang 1.6; move to vendoring.
2016-04-07 16:54:25 -07:00
Nino Khodabandeh
08067f95ff
Fixes go import
...
- changed dotted import in tail_test since it was causing suite failure
2016-04-07 16:41:16 -07:00
Nino Khodabandeh
665473a0d8
Updated Changes.md and travis.yml
...
- Included the godep migration and vendoring folder into changes.md
- Updated travis.yml to deprecate support for golang 1.3
- Added 1.6 and tip run to travis.yml
2016-04-07 16:21:17 -07:00
Nino Khodabandeh
0e7c7c1aee
Godep workspace -> vendor directory
2016-04-07 16:14:15 -07:00
Nino Khodabandeh
9e6542941b
Merge branch 'tcheneau-typo-fix'
2016-04-06 16:25:08 -07:00
Nino Khodabandeh
d777a48bf8
Merge branch 'typo-fix' of https://github.com/tcheneau/tail into tcheneau-typo-fix
2016-04-06 16:23:43 -07:00
Mark Yen
d149232c39
Merge pull request #79 from hpcloud/add-godep
...
Adds godep, and removes depman since deprecated
2016-04-06 16:13:43 -07:00
Nino Khodabandeh
1763ddcc04
Adds godep, and removes depman since deprecated
2016-04-06 11:26:07 -07:00
Nino Khodabandeh
2e817490f9
Merge branch 'ando-masaki-master'
2016-04-04 15:53:00 -07:00
Nino Khodabandeh
0ea51b0fd6
Changes the path clean to absolute path
2016-04-04 15:51:37 -07:00
Nino Khodabandeh
e43dce6dc1
Merge branch 'flynn-stop-at-eof'
2016-04-04 12:57:23 -07:00
Nino Khodabandeh
468784e1d4
Merge branch 'stop-at-eof' of https://github.com/flynn/tail into flynn-stop-at-eof
2016-04-04 12:56:46 -07:00
Tony Cheneau
2f69c9fa4e
Fix typo (colseFile -> closeFile)
2016-04-04 16:51:26 +02:00
Benoit Sigoure
6c6f39c586
watch: Fix prototype to be more restrictive.
...
Change-Id: Ic744312efa91cf5c2dc2810e597353a080dccb70
2016-03-01 10:05:21 -08:00
Benoit Sigoure
d5f9e6c087
tail: Fix tyop.
...
Change-Id: I0f9b88fc327b169c748794e86efb0aa0a03b3e2a
2016-03-01 10:05:19 -08:00
Benoit Sigoure
0bc5f080e8
watch: Unsubscribe from fsnotify synchronously.
...
Calling watcher.Remove() from the run() goroutine is now problematic,
because with the change made in fsnotify/fsnotify#73 Remove() can now
take an arbitrary amount of time, which means we can deadlock if run()
is waiting for fsnotify to acknowledge the removal and fsnotify is
trying to send an unrelated Event.
So instead we now do part of the cleanup, including calling Remove(),
synchronously, in the goroutine trying to unsubscribe.
This fixes #75 . Thanks to Aaron Beitch for the fix.
Change-Id: I346c9eecc34b2378312b07b3c3efc41616b95380
2016-03-01 10:05:17 -08:00
Nino Khodabandeh
1a0242e795
Merge pull request #72 from miraclesu/fix/watch_create
...
fix block until exists function
2016-01-19 12:44:47 -08:00
miraclesu
44f3947385
Add race detection on Travis CI
2016-01-05 10:07:56 +08:00
miraclesu
089d8456a7
test in go1.5.2
2015-12-24 17:50:07 +08:00
miraclesu
274567a526
fix data race
2015-12-24 16:47:46 +08:00
Nino Khodabandeh
272d489eea
Update README.md
...
Points build status to a correct url
2015-12-18 15:33:59 -08:00
miraclesu
2bc904e34f
colse file just one time
2015-12-09 16:38:19 +08:00
miraclesu
6aef373ea6
fix block until exists function
2015-12-09 15:29:06 +08:00
Nino Khodabandeh
157f8ef18f
Merge branch 'ajacoutot-openbsd'
2015-11-02 12:50:03 -08:00
Nino Khodabandeh
9e7c303211
Merge branch 'openbsd' of https://github.com/ajacoutot/tail into ajacoutot-openbsd
2015-11-02 12:49:12 -08:00
Nino Khodabandeh
5ef9f2ea8d
Merge pull request #66 from ober/master
...
Add NetBSD support.
2015-11-02 10:42:57 -08:00
Antoine Jacoutot
c05830b483
Build tail_posix on openbsd as well.
2015-10-31 11:02:26 +01:00
Jaime Fournier
de15be56e0
add netbsd
2015-10-28 18:28:02 -07:00
Nino Khodabandeh
0f289693ec
Merge branch '42wim-namedpipe'
2015-10-28 10:03:00 -07:00
Nino Khodabandeh
71a3d44347
Merge branch 'namedpipe' of https://github.com/42wim/tail into 42wim-namedpipe
2015-10-28 10:02:44 -07:00
Nino Khodabandeh
b2c9cdec99
Merge pull request #58 from aristanetworks/upstream
...
Single shared Watcher used to avoid inotify limit
2015-10-28 08:39:08 -07:00
Benoit Sigoure
f69ef84e36
Fix race in the detection of truncation.
...
Before going into ChangeEvents(), the code was calling stat on the file
to know where it was at, which is incorrect as stat could return the new
file size post truncation. Instead we now ask the file descriptor about
our current offset, so we can compare our offset to the file size to try
to detect truncation.
Truncation detection remains brittle, but this closes an annoying race
we frequently run into.
2015-10-27 22:42:26 -07:00
Alex Liu
abb1479f04
Remove pointer from fsnotify.Event
2015-10-27 22:42:26 -07:00
Alex Liu
8b4773e24e
Upgrade to fsnotify.v1
2015-10-27 22:42:25 -07:00
Andy Ouyang
d46611791d
Moved InotifyTracker initialization to constructor function
2015-10-27 22:42:25 -07:00
Andy Ouyang
a5dc0d39ba
Ensure InotifyTracker attempts to send all FileEvents
2015-10-27 22:42:25 -07:00
Andy Ouyang
f053e2cd0c
Fixed race conditions in watch/inotify_tracker.go
2015-10-27 22:42:25 -07:00
Andy Ouyang
0b9f044bb3
Ignoring EINTR (ctrl+Z) signal
2015-10-27 22:42:25 -07:00
Andy Ouyang
b155fc13d4
Single shared Watcher used to avoid inotify limit
2015-10-27 22:42:07 -07:00
Nino Khodabandeh
213cadfb2e
Merge pull request #63 from ekini/master
...
Make Logger an interface, so external logger can be used, closes #52
2015-10-27 22:38:56 -07:00