diff options
author | Greg V <greg@unrelenting.technology> | 2018-01-04 02:48:39 +0300 |
---|---|---|
committer | Greg V <greg@unrelenting.technology> | 2018-02-12 12:52:10 +0300 |
commit | 5600cc40d5e558a6cd722b43fb708d9bd36e29a9 (patch) | |
tree | 9b9446ef4335e330592aaac3e3b21257a929d52b | |
parent | 9eddb1ea14bfd643608c964331f26fb721069634 (diff) | |
download | nix-5600cc40d5e558a6cd722b43fb708d9bd36e29a9.zip |
Add missing kqueue event filters on FreeBSD
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/sys/event.rs | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 11d7774b..f3b03799 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ([#853](https://github.com/nix-rust/nix/pull/853)) - Added `statvfs` module to all MacOS and Linux architectures. ([#832](https://github.com/nix-rust/nix/pull/832)) +- Added `EVFILT_EMPTY`, `EVFILT_PROCDESC` and `EVFILT_SENDFILE` on FreeBSD. + ([#825](https://github.com/nix-rust/nix/pull/825)) ### Changed - Display and Debug for SysControlAddr now includes all fields. diff --git a/src/sys/event.rs b/src/sys/event.rs index 3a6c528d..e2a4eaa1 100644 --- a/src/sys/event.rs +++ b/src/sys/event.rs @@ -40,6 +40,9 @@ libc_enum! { #[cfg_attr(not(target_os = "netbsd"), repr(i16))] pub enum EventFilter { EVFILT_AIO, + /// Returns whenever there is no remaining data in the write buffer + #[cfg(target_os = "freebsd")] + EVFILT_EMPTY, #[cfg(target_os = "dragonfly")] EVFILT_EXCEPT, #[cfg(any(target_os = "dragonfly", @@ -52,7 +55,16 @@ libc_enum! { #[cfg(any(target_os = "ios", target_os = "macos"))] EVFILT_MACHPORT, EVFILT_PROC, + /// Returns events associated with the process referenced by a given + /// process descriptor, created by `pdfork()`. The events to monitor are: + /// + /// - NOTE_EXIT: the process has exited. The exit status will be stored in data. + #[cfg(target_os = "freebsd")] + EVFILT_PROCDESC, EVFILT_READ, + /// Returns whenever an asynchronous `sendfile()` call completes. + #[cfg(target_os = "freebsd")] + EVFILT_SENDFILE, EVFILT_SIGNAL, EVFILT_TIMER, #[cfg(any(target_os = "dragonfly", |