Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump inotify from "0.10.0" to "0.10.2" #1139

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion northstar-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
7 changes: 4 additions & 3 deletions northstar-runtime/src/runtime/cgroups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,18 +319,19 @@ 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 {
debug!("Listening for v2 oom events of {}", container);

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 {
Expand Down
Loading