Send signals using the correct context for each

This commit is contained in:
Luke D. Jones
2022-11-06 12:48:19 +13:00
parent 58ff566d65
commit 688e3a7358
6 changed files with 29 additions and 21 deletions

View File

@@ -23,7 +23,7 @@ macro_rules! watch_attr {
path.push($attr_name);
if let Some(path) = path.to_str() {
let mut inotify = inotify::Inotify::init()?;
inotify.add_watch(path, inotify::WatchMask::MODIFY)
inotify.add_watch(path, inotify::WatchMask::CLOSE_WRITE)
.map_err(|e| {
if e.kind() == std::io::ErrorKind::NotFound {
PlatformError::AttrNotFound(format!("{}", $attr_name))