Skip to content

Commit

Permalink
Merge pull request #38 from Jakob-Naucke/update-nix
Browse files Browse the repository at this point in the history
Update nix to 0.20.0
  • Loading branch information
lifupan committed Feb 25, 2021
2 parents 87f0587 + b9ca0a5 commit 16d73e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -14,7 +14,7 @@ readme = "README.md"
[dependencies]
log = "0.4"
regex = "1.1"
nix = "0.18.0"
nix = "0.20.0"
libc = "0.2"

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions tests/pids.rs
Expand Up @@ -62,7 +62,7 @@ fn test_pid_events_is_not_zero() {
let before = pids.get_pid_events();
let before = before.unwrap();

match fork() {
match unsafe { fork() } {
Ok(ForkResult::Parent { child, .. }) => {
// move the process into the control group
let _ = pids.add_task(&(pid_t::from(child) as u64).into());
Expand All @@ -89,7 +89,7 @@ fn test_pid_events_is_not_zero() {
Ok(ForkResult::Child) => loop {
let pids_max = pids.get_pid_max();
if pids_max.is_ok() && pids_max.unwrap() == MaxValue::Value(1) {
if let Err(_) = fork() {
if let Err(_) = unsafe { fork() } {
unsafe { libc::exit(0) };
} else {
unsafe { libc::exit(1) };
Expand Down

0 comments on commit 16d73e1

Please sign in to comment.