File tree 1 file changed +13
-3
lines changed
library/std/src/sys/unix/process
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -333,9 +333,19 @@ impl Command {
333
333
let mut set = MaybeUninit :: < libc:: sigset_t > :: uninit ( ) ;
334
334
cvt ( sigemptyset ( set. as_mut_ptr ( ) ) ) ?;
335
335
cvt ( libc:: pthread_sigmask ( libc:: SIG_SETMASK , set. as_ptr ( ) , ptr:: null_mut ( ) ) ) ?;
336
- let ret = sys:: signal ( libc:: SIGPIPE , libc:: SIG_DFL ) ;
337
- if ret == libc:: SIG_ERR {
338
- return Err ( io:: Error :: last_os_error ( ) ) ;
336
+
337
+ #[ cfg( target_os = "android" ) ] // see issue #88585
338
+ {
339
+ let mut action: libc:: sigaction = mem:: zeroed ( ) ;
340
+ action. sa_sigaction = libc:: SIG_DFL ;
341
+ cvt ( libc:: sigaction ( libc:: SIGPIPE , & action, ptr:: null_mut ( ) ) ) ?;
342
+ }
343
+ #[ cfg( not( target_os = "android" ) ) ]
344
+ {
345
+ let ret = sys:: signal ( libc:: SIGPIPE , libc:: SIG_DFL ) ;
346
+ if ret == libc:: SIG_ERR {
347
+ return Err ( io:: Error :: last_os_error ( ) ) ;
348
+ }
339
349
}
340
350
}
341
351
You can’t perform that action at this time.
0 commit comments