Skip to content

Commit

Permalink
Bump nix from 0.27.1 to 0.28.0
Browse files Browse the repository at this point in the history
Bumps [nix](https://github.com/nix-rust/nix) from 0.27.1 to 0.28.0.
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](nix-rust/nix@v0.27.1...v0.28.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and Felix Obenhuber committed Mar 4, 2024
1 parent cd1e677 commit cbe1c49
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 22 deletions.
25 changes: 16 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/inspect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "Apache-2.0"

[dependencies]
caps = "0.5.5"
nix = { version = "0.27.1", default-features = false, features = [ "process", "user", "signal" ] }
nix = { version = "0.28.0", default-features = false, features = [ "process", "user", "signal" ] }

[package.metadata.npk]
manifest = "manifest.yaml"
Expand Down
2 changes: 1 addition & 1 deletion examples/test-container/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "Apache-2.0"
anyhow = { version = "1.0.80", features = ["backtrace"] }
caps = "0.5.5"
clap = { version = "4.2.7", features = ["derive"] }
nix = { version = "0.27.1", default-features = false, features = ["process", "user"] }
nix = { version = "0.28.0", default-features = false, features = ["process", "user"] }
socket2 = { version = "0.5.5", features = ["all"] }

[package.metadata.npk]
Expand Down
2 changes: 1 addition & 1 deletion northstar-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ memchr = "2.6.2"
memfd = { version = "0.6.2", optional = true }
memoffset = { version = "0.9.0", optional = true }
nanoid = { version = "0.4.0", optional = true }
nix = { version = "0.27.1", default-features = false, features = ["fs", "sched", "ioctl", "mount", "term", "uio", "socket", "net", "signal", "user"], optional = true }
nix = { version = "0.28.0", default-features = false, features = ["fs", "sched", "ioctl", "mount", "term", "uio", "socket", "net", "signal", "user"], optional = true }
pkg-version = { version = "1.0.0", optional = true }
rand_core = { version = "0.6.4", features = ["getrandom"], optional = true }
rlimit = { version = "0.10.1", optional = true }
Expand Down
10 changes: 4 additions & 6 deletions northstar-runtime/src/runtime/ipc/raw_fd_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,19 @@ impl<T: AsRawFd> RawFdExt for T {
#[allow(clippy::unwrap_used)]
fn non_blocking() {
let (a, b) = nix::unistd::pipe().unwrap();
nix::unistd::close(b).unwrap();
drop(b);

let opt = unsafe { nix::libc::fcntl(a, nix::libc::F_GETFL) };
let opt = unsafe { nix::libc::fcntl(a.as_raw_fd(), nix::libc::F_GETFL) };
assert!((dbg!(opt) & nix::libc::O_NONBLOCK) == 0);
assert!(!a.is_nonblocking().unwrap());

a.set_nonblocking(true).unwrap();
let opt = unsafe { nix::libc::fcntl(a, nix::libc::F_GETFL) };
let opt = unsafe { nix::libc::fcntl(a.as_raw_fd(), nix::libc::F_GETFL) };
assert!((dbg!(opt) & nix::libc::O_NONBLOCK) != 0);
assert!(a.is_nonblocking().unwrap());

a.set_nonblocking(false).unwrap();
let opt = unsafe { nix::libc::fcntl(a, nix::libc::F_GETFL) };
let opt = unsafe { nix::libc::fcntl(a.as_raw_fd(), nix::libc::F_GETFL) };
assert!((dbg!(opt) & nix::libc::O_NONBLOCK) == 0);
assert!(!a.is_nonblocking().unwrap());

nix::unistd::close(a).unwrap();
}
4 changes: 2 additions & 2 deletions northstar-runtime/src/runtime/sockets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use log::debug;
use nix::{
sys::{
socket,
socket::{sockopt, AddressFamily, SockFlag, SockType, UnixAddr},
socket::{sockopt, AddressFamily, Backlog, SockFlag, SockType, UnixAddr},
},
unistd::{fchown, Gid, Uid},
};
Expand Down Expand Up @@ -90,7 +90,7 @@ pub(crate) async fn open(

// Streaming and seqpacket sockets need to be listened on.
if matches!(ty, Type::Stream | Type::SeqPacket) {
socket::listen(&socket, 100).context("failed to listen")?;
socket::listen(&socket, Backlog::MAXCONN).context("failed to listen")?;
}

debug!(
Expand Down
2 changes: 1 addition & 1 deletion northstar-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lazy_static = "1.4.0"
log = "0.4.21"
memfd = "0.6.2"
nanoid = "0.4.0"
nix = { version = "0.27.1", features = ["sched"], default-features = false }
nix = { version = "0.28.0", features = ["sched"], default-features = false }
northstar-client = { path = "../northstar-client" }
northstar-runtime = { path = "../northstar-runtime", features = ["api", "runtime"] }
northstar-tests-derive = { path = "northstar-tests-derive" }
Expand Down
2 changes: 1 addition & 1 deletion northstar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rust-version.workspace = true
anyhow = { version = "1.0.80", features = ["backtrace"] }
clap = { version = "4.2.7", features = ["derive"] }
log = { version = "0.4.21", features = ["std"] }
nix = { version = "0.27.1", default-features = false, features = ["sched", "mount"] }
nix = { version = "0.28.0", default-features = false, features = ["sched", "mount"] }
northstar-runtime = { version = "^0.9.2-pre", path = "../northstar-runtime", features = ["runtime", "rexec"] }
tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros", "signal"] }
toml = "0.8.8"
Expand Down

0 comments on commit cbe1c49

Please sign in to comment.