diff --git a/northstar-runtime/Cargo.toml b/northstar-runtime/Cargo.toml index 976222891..704e1be9b 100644 --- a/northstar-runtime/Cargo.toml +++ b/northstar-runtime/Cargo.toml @@ -28,7 +28,7 @@ hex = { version = "0.4.3", optional = true } hmac = { version = "0.12.1", features = ["reset"], optional = true } humanize-rs = { version = "0.1.5", optional = true } humantime-serde = { version = "1.1.1", optional = true } -inotify = { version = "0.10.0", features = ["stream"], optional = true } +inotify = { version = "0.10.2", features = ["stream"], optional = true } itertools = { version = "0.12.1", optional = true } lazy_static = { version = "1.4.0", optional = true } libc = { version = "0.2.155", optional = true } diff --git a/northstar-runtime/src/runtime/cgroups.rs b/northstar-runtime/src/runtime/cgroups.rs index 7c8cf3539..2757fe0f5 100644 --- a/northstar-runtime/src/runtime/cgroups.rs +++ b/northstar-runtime/src/runtime/cgroups.rs @@ -319,10 +319,11 @@ impl MemoryMonitor { // This task stops when the main loop receiver closes let task = { let stop = token.clone(); - let mut inotify = Inotify::init().expect("Error while initializing inotify instance"); + let inotify = Inotify::init().expect("Error while initializing inotify instance"); inotify - .add_watch(&path, WatchMask::MODIFY) + .watches() + .add(&path, WatchMask::MODIFY) .expect("failed to add file watch"); task::spawn(async move { @@ -330,7 +331,7 @@ impl MemoryMonitor { let mut buffer = [0; 1024]; let mut stream = inotify - .event_stream(&mut buffer) + .into_event_stream(&mut buffer) .expect("failed to initialize inotify event stream"); 'outer: loop {