Skip to content

Commit be40a3f

Browse files
committed
try-wait test: Check exit status from wait for killed child
We are making `ExitStatus` `#[must_use]`. So we need to explicitly handle the exit status here. Handle it the same way as the values from the repeated calls to `try_wait`. Signed-off-by: Ian Jackson <[email protected]>
1 parent d49fd08 commit be40a3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/ui/try-wait.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ fn main() {
3131
assert!(maybe_status.is_none());
3232

3333
me.kill().unwrap();
34-
me.wait().unwrap();
34+
let status = me.wait().unwrap();
35+
assert!(!status.success());
3536

3637
let status = me.try_wait().unwrap().unwrap();
3738
assert!(!status.success());

0 commit comments

Comments
 (0)