File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1570,10 +1570,9 @@ fn test_wrong_args_exit_code() {
15701570#[ test]
15711571#[ cfg( unix) ]
15721572fn 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.
You can’t perform that action at this time.
0 commit comments