From a7251fe6da923c0cd41d941d2e2337156a385702 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Tue, 19 May 2026 16:43:11 +0900 Subject: [PATCH] tests_sort.rs: remove nix --- tests/by-util/test_sort.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/by-util/test_sort.rs b/tests/by-util/test_sort.rs index 05337174260..6d81394b298 100644 --- a/tests/by-util/test_sort.rs +++ b/tests/by-util/test_sort.rs @@ -1570,10 +1570,9 @@ fn test_wrong_args_exit_code() { #[test] #[cfg(unix)] fn test_tmp_files_deleted_on_sigint() { - use std::{fs::read_dir, time::Duration}; - - use nix::{sys::signal, unistd::Pid}; use rand::{RngExt as _, SeedableRng, rngs::SmallRng}; + use rustix::process::{Pid, Signal, kill_process}; + use std::{fs::read_dir, time::Duration}; let (at, mut ucmd) = at_and_ucmd!(); at.mkdir("tmp_dir"); @@ -1609,7 +1608,7 @@ fn test_tmp_files_deleted_on_sigint() { // `sort` should have created a temporary directory. assert!(read_dir(at.plus("tmp_dir")).unwrap().next().is_some()); // kill sort with SIGINT - signal::kill(Pid::from_raw(child.id() as i32), signal::SIGINT).unwrap(); + kill_process(Pid::from_raw(child.id() as i32).unwrap(), Signal::INT).unwrap(); // wait for `sort` to exit child.wait().unwrap().code_is(2); // `sort` should have deleted the temporary directory again.