Commit graph

416 commits

Author SHA1 Message Date
Sönke Ludwig 324338205b
Merge pull request #45 from kubo39/efd-cloexec
Set EFD_CLOEXEC
2017-12-19 10:45:11 +01:00
Hiroki Noda 214382dcb5 Set EFD_CLOEXEC
Add missing one.
2017-12-19 13:38:47 +09:00
The Dlang Bot 94028e56dd
Merge pull request #44 from vibe-d/cloexec
Set O_CLOEXEC on socket descriptors
merged-on-behalf-of: Sönke Ludwig <s-ludwig@users.noreply.github.com>
2017-12-18 17:35:18 +01:00
Sönke Ludwig 8528b4ec00 Fix accidental resetting of O_NONBLOCK and set O_CLOEXEC on outgoing sockets, too. 2017-12-18 14:07:38 +01:00
Sönke Ludwig 50fe0b28b5 Add watchdog timer and log output to flaky test. 2017-12-18 14:06:58 +01:00
Hiroki Noda 1179163150 Add O_CLOEXEC for some posix platform 2017-12-18 09:44:08 +01:00
Hiroki Noda b252c97012 Set close-on-exec flag to prevent fd leakage for command execution 2017-12-18 09:44:08 +01:00
The Dlang Bot 107f4c084f
Merge pull request #43 from vibe-d/test_latest_compilers
Test the latest compiler versions.
merged-on-behalf-of: Sönke Ludwig <s-ludwig@users.noreply.github.com>
2017-12-18 01:13:46 +01:00
Sönke Ludwig 93f92dccf8 Support LDC/GDC for the win32 configuration. 2017-12-17 22:42:36 +01:00
Sönke Ludwig 7ea0e34a46 Further increase the timer test tolerance to account for the macOS builds. 2017-12-17 22:17:40 +01:00
Sönke Ludwig 9a580ccbf9 Test the latest compiler versions. 2017-12-17 22:17:40 +01:00
Sönke Ludwig 2005c93f53 Display the timeout different in timer assertions. 2017-12-17 12:05:58 +01:00
Hiroki Noda 83317bb2bf Call __res_init on linux when getaddrinfo failed, fix #40 2017-12-17 11:55:20 +09:00
Sönke Ludwig c3fa500c3b
Merge pull request #39 from kubo39/epoll-cloexec
Set EPOLL_CLOEXEC to prevent fd leakage for command executation
2017-12-16 18:58:40 +01:00
Sönke Ludwig 2c6b69590d Relax timer test constraints and don't gag assertions.
Attempts to fix the flaky tests on macOS.
2017-12-16 18:53:58 +01:00
Sönke Ludwig 135217066f
Merge pull request #41 from vibe-d/fix_winapi_connect_waitercount
Properly increment the waiter count during async TCP connect.
2017-12-16 18:25:14 +01:00
Sönke Ludwig c45f7dc35e Properly increment the waiter count during async TCP connect. 2017-12-16 17:55:13 +01:00
Hiroki Noda 277743914b Set EPOLL_CLOEXEC to prevent fd leakage for command executation
This is for the same reason #38
2017-12-16 10:16:43 +09:00
Sönke Ludwig 979640b074 Increase the tolerance for the second timer test, too. 2017-12-02 13:47:36 +01:00
Sönke Ludwig 929164e114 Increase timer tolerance in test to avoid macOS failures. 2017-12-02 13:16:30 +01:00
Sönke Ludwig 65b9b71cf8
Merge pull request #36 from vibe-d/fix_inotify_rec_watcher
Fix inotify based directory watcher for recursive directory adds.
2017-12-02 13:15:53 +01:00
Sönke Ludwig 9ca1a4c3a6 Fix inotify based directory watcher for recursive directory adds.
Newly added folders were not scanned recursively, which would result in sub folders that already exist or are added concurrently to not be watched.
2017-12-02 02:54:13 +01:00
Sönke Ludwig 29aee9ee52 Defer driver dispose in main thread to shared static ~this.
Allows dependent code to still access the driver from within their shared static ~this. vibe-core notably falls into this category.
2017-11-25 16:59:53 +01:00
Sönke Ludwig 2d4ccf454d Properly increment waiter count for WinAPI file I/O operations. 2017-11-25 16:47:29 +01:00
The Dlang Bot 2e3f145f0f
Merge pull request #35 from vibe-d/avoid_dot_in_watcher_path
Fix more directory watcher issues, especially on macOS
merged-on-behalf-of: l-kramer <l-kramer@users.noreply.github.com>
2017-11-25 13:12:17 +01:00
Sönke Ludwig a7c5aea124 Reformat the driver status table to be more compact. 2017-11-25 11:54:18 +01:00
Sönke Ludwig 07d2bafcac Fix threading issues in the generic Posix event implementation.
Uses socketpair non-Linux systems and two separate UDP sockets on Windows for the cross-thread communication.
2017-11-25 11:42:19 +01:00
Sönke Ludwig a5d4cf875c Add adoptDatagramSocketInternal. 2017-11-25 00:26:44 +01:00
Sönke Ludwig c8eb30f6f0 Remove polling threads from map. 2017-11-25 00:26:20 +01:00
Sönke Ludwig 31286e4580 Ensure the socket handle passed to callbacks is always valid on Posix. 2017-11-23 23:12:35 +01:00
Sönke Ludwig 4d00376873 Ensure proper reference count for created Posix events. 2017-11-23 23:12:35 +01:00
Sönke Ludwig 7795195ec1 Fix recursive directory watcher test to check for unexpected events. 2017-11-23 23:11:16 +01:00
Sönke Ludwig e154446a9d Enable directory watcher tests on macOS.
Also fixes some timings to work with the polling watcher implementation.
2017-11-23 23:11:16 +01:00
Sönke Ludwig 19879712e6 Fix shutdown procedure and rename event order for the polling watcher.
Renames should always be reported as removed->added instead of added->removed.
2017-11-23 23:11:16 +01:00
Sönke Ludwig 1d4fbc4fa2 Fixup poll driver. 2017-11-23 23:11:16 +01:00
Sönke Ludwig c8fd340240 Fix destruction of PosixEventDriverEvents event.
The reference count was one too high and the waiter count was not properly decremented when an event got destroyed.
2017-11-23 23:11:16 +01:00
Sönke Ludwig aa9a08f571 Explicitly dispose the event driver on thread shutdown.
Handle multiple calls to dispose() gracefully, because external code may already make an explicit call to dispose().
2017-11-23 23:11:16 +01:00
The Dlang Bot 1cadc3077b
Merge pull request #34 from vibe-d/avoid_dot_in_watcher_path
Avoid "." path in InotifyEventDriverWatchers.
merged-on-behalf-of: Sönke Ludwig <s-ludwig@users.noreply.github.com>
2017-11-22 18:28:27 +01:00
Sönke Ludwig 16e95b03e8 Fix WinAPI watcher to be consistent. 2017-11-22 17:14:31 +01:00
Sönke Ludwig a9ae496fb4 Avoid "." path in InotifyEventDriverWatchers.
The vibe-core tests broke because a "/./" path segment slipped into the resulting paths.
2017-11-22 17:07:49 +01:00
l-kramer faf4bbcdc1
Merge pull request #32 from vibe-d/recursive_dirwatch
Improve directory watching
2017-11-21 21:26:39 +01:00
Sönke Ludwig c3d49db8c5 Update README. 2017-11-21 10:42:22 +01:00
Sönke Ludwig 5246593432 Fix handling recursive inotify based directory watchers. 2017-11-21 10:42:21 +01:00
Sönke Ludwig 0ec498207d Gag directory modified events in win32. 2017-11-21 10:42:21 +01:00
Sönke Ludwig 99088e1202 Implement a generic polling based directory watcher.
This is used on platforms that don't have a specialized watcher implementation.
2017-11-21 10:42:21 +01:00
Sönke Ludwig 815db0727c Change all invalid handle values to ~0 and improve FileChange.
FileChange now has the full path of a file split into the base path (as specified when creating the watcher), the sub directory, and the file name. This allows to work with less dynamic memory allocations internally.
2017-11-21 10:42:14 +01:00
Sönke Ludwig 5bba45485c Add recursive directory watcher test. 2017-11-21 08:59:19 +01:00
Sönke Ludwig 3352423414 Fix decrementing the waiter count when destroying a WinAPI event with active waiters. 2017-11-21 00:09:41 +01:00
Sönke Ludwig fdeef38ef4 Fix waiter count tracking for WinAPI directory watchers and avoid empty callbacks. 2017-11-20 15:59:35 +01:00
Sönke Ludwig 314bd2bb48 Fix WinAPI condition for outOfWaiters event loop exit reason.
Calling processEvents could previously block indefinitely even if there were no waiters left.
2017-11-20 15:59:35 +01:00