File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -1088,11 +1088,17 @@ fn interrupt_caught_and_kills_children() {
10881088 child. terminate ( ) . expect ( "terminate child" ) ;
10891089
10901090 println ! ( "Wait for cargo-mutants to exit..." ) ;
1091- let exit_status = child
1092- . wait_timeout ( Duration :: from_secs ( 4 ) )
1093- . expect ( "wait for child" )
1094- . expect ( "child exited" ) ;
1095- println ! ( "Child exited with status: {:?}" , exit_status) ;
1091+ match child. wait_timeout ( Duration :: from_secs ( 4 ) ) {
1092+ Err ( e) => panic ! ( "failed to wait for child: {}" , e) ,
1093+ Ok ( None ) => {
1094+ println ! ( "child did not exit after interrupt" ) ;
1095+ child. kill ( ) . expect ( "kill child" ) ;
1096+ child. wait ( ) . expect ( "wait for child after kill" ) ;
1097+ }
1098+ Ok ( Some ( status) ) => {
1099+ println ! ( "cargo-mutants exited with status: {status:?}" ) ;
1100+ }
1101+ }
10961102
10971103 let mut stdout = String :: new ( ) ;
10981104 child
You can’t perform that action at this time.
0 commit comments