File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
library/std/src/sys/unix/process Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use super::*;
33use crate :: ffi:: OsStr ;
44use crate :: mem;
55use crate :: ptr;
6- use crate :: sys:: cvt;
6+ use crate :: sys:: { cvt, cvt_nz } ;
77
88macro_rules! t {
99 ( $e: expr) => {
@@ -39,7 +39,7 @@ fn test_process_mask() {
3939 let mut old_set = mem:: MaybeUninit :: < libc:: sigset_t > :: uninit ( ) ;
4040 t ! ( cvt( sigemptyset( set. as_mut_ptr( ) ) ) ) ;
4141 t ! ( cvt( sigaddset( set. as_mut_ptr( ) , libc:: SIGINT ) ) ) ;
42- t ! ( cvt ( libc:: pthread_sigmask( libc:: SIG_SETMASK , set. as_ptr( ) , old_set. as_mut_ptr( ) ) ) ) ;
42+ t ! ( cvt_nz ( libc:: pthread_sigmask( libc:: SIG_SETMASK , set. as_ptr( ) , old_set. as_mut_ptr( ) ) ) ) ;
4343
4444 cmd. stdin ( Stdio :: MakePipe ) ;
4545 cmd. stdout ( Stdio :: MakePipe ) ;
@@ -48,7 +48,7 @@ fn test_process_mask() {
4848 let stdin_write = pipes. stdin . take ( ) . unwrap ( ) ;
4949 let stdout_read = pipes. stdout . take ( ) . unwrap ( ) ;
5050
51- t ! ( cvt ( libc:: pthread_sigmask( libc:: SIG_SETMASK , old_set. as_ptr( ) , ptr:: null_mut( ) ) ) ) ;
51+ t ! ( cvt_nz ( libc:: pthread_sigmask( libc:: SIG_SETMASK , old_set. as_ptr( ) , ptr:: null_mut( ) ) ) ) ;
5252
5353 t ! ( cvt( libc:: kill( cat. id( ) as libc:: pid_t, libc:: SIGINT ) ) ) ;
5454 // We need to wait until SIGINT is definitely delivered. The
Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ impl Command {
279279 stdio : ChildPipes ,
280280 maybe_envp : Option < & CStringArray > ,
281281 ) -> Result < !, io:: Error > {
282- use crate :: sys:: { self , cvt_r} ;
282+ use crate :: sys:: { self , cvt_nz , cvt_r} ;
283283
284284 if let Some ( fd) = stdio. stdin . fd ( ) {
285285 cvt_r ( || libc:: dup2 ( fd, libc:: STDIN_FILENO ) ) ?;
@@ -333,7 +333,7 @@ impl Command {
333333 // we're about to run.
334334 let mut set = MaybeUninit :: < libc:: sigset_t > :: uninit ( ) ;
335335 cvt ( sigemptyset ( set. as_mut_ptr ( ) ) ) ?;
336- cvt ( libc:: pthread_sigmask ( libc:: SIG_SETMASK , set. as_ptr ( ) , ptr:: null_mut ( ) ) ) ?;
336+ cvt_nz ( libc:: pthread_sigmask ( libc:: SIG_SETMASK , set. as_ptr ( ) , ptr:: null_mut ( ) ) ) ?;
337337
338338 #[ cfg( target_os = "android" ) ] // see issue #88585
339339 {
You can’t perform that action at this time.
0 commit comments