File tree 2 files changed +5
-5
lines changed
library/std/src/sys/unix/process
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use super::*;
3
3
use crate :: ffi:: OsStr ;
4
4
use crate :: mem;
5
5
use crate :: ptr;
6
- use crate :: sys:: cvt;
6
+ use crate :: sys:: { cvt, cvt_nz } ;
7
7
8
8
macro_rules! t {
9
9
( $e: expr) => {
@@ -39,7 +39,7 @@ fn test_process_mask() {
39
39
let mut old_set = mem:: MaybeUninit :: < libc:: sigset_t > :: uninit ( ) ;
40
40
t ! ( cvt( sigemptyset( set. as_mut_ptr( ) ) ) ) ;
41
41
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( ) ) ) ) ;
43
43
44
44
cmd. stdin ( Stdio :: MakePipe ) ;
45
45
cmd. stdout ( Stdio :: MakePipe ) ;
@@ -48,7 +48,7 @@ fn test_process_mask() {
48
48
let stdin_write = pipes. stdin . take ( ) . unwrap ( ) ;
49
49
let stdout_read = pipes. stdout . take ( ) . unwrap ( ) ;
50
50
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( ) ) ) ) ;
52
52
53
53
t ! ( cvt( libc:: kill( cat. id( ) as libc:: pid_t, libc:: SIGINT ) ) ) ;
54
54
// 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 {
279
279
stdio : ChildPipes ,
280
280
maybe_envp : Option < & CStringArray > ,
281
281
) -> Result < !, io:: Error > {
282
- use crate :: sys:: { self , cvt_r} ;
282
+ use crate :: sys:: { self , cvt_nz , cvt_r} ;
283
283
284
284
if let Some ( fd) = stdio. stdin . fd ( ) {
285
285
cvt_r ( || libc:: dup2 ( fd, libc:: STDIN_FILENO ) ) ?;
@@ -333,7 +333,7 @@ impl Command {
333
333
// we're about to run.
334
334
let mut set = MaybeUninit :: < libc:: sigset_t > :: uninit ( ) ;
335
335
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 ( ) ) ) ?;
337
337
338
338
#[ cfg( target_os = "android" ) ] // see issue #88585
339
339
{
You can’t perform that action at this time.
0 commit comments