Skip to content

Commit 1db0a45

Browse files
oech3cakebaker
authored andcommitted
tests_sort.rs: remove nix
1 parent b1bf13f commit 1db0a45

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/by-util/test_sort.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,10 +1570,9 @@ fn test_wrong_args_exit_code() {
15701570
#[test]
15711571
#[cfg(unix)]
15721572
fn test_tmp_files_deleted_on_sigint() {
1573-
use std::{fs::read_dir, time::Duration};
1574-
1575-
use nix::{sys::signal, unistd::Pid};
15761573
use rand::{RngExt as _, SeedableRng, rngs::SmallRng};
1574+
use rustix::process::{Pid, Signal, kill_process};
1575+
use std::{fs::read_dir, time::Duration};
15771576

15781577
let (at, mut ucmd) = at_and_ucmd!();
15791578
at.mkdir("tmp_dir");
@@ -1609,7 +1608,7 @@ fn test_tmp_files_deleted_on_sigint() {
16091608
// `sort` should have created a temporary directory.
16101609
assert!(read_dir(at.plus("tmp_dir")).unwrap().next().is_some());
16111610
// kill sort with SIGINT
1612-
signal::kill(Pid::from_raw(child.id() as i32), signal::SIGINT).unwrap();
1611+
kill_process(Pid::from_raw(child.id() as i32).unwrap(), Signal::INT).unwrap();
16131612
// wait for `sort` to exit
16141613
child.wait().unwrap().code_is(2);
16151614
// `sort` should have deleted the temporary directory again.

0 commit comments

Comments
 (0)