浏览代码

Check for `EINTR` in `sys/posix` test

Feoramund 11 月之前
父节点
当前提交
16ef59700b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      tests/core/sys/posix/structs.odin

+ 3 - 0
tests/core/sys/posix/structs.odin

@@ -63,6 +63,9 @@ execute_struct_checks :: proc(t: ^testing.T) {
 		waiting: for {
 			status: i32
 			wpid := posix.waitpid(pid, &status, {})
+			if status == posix.EINTR {
+				continue
+			}
 			if !testing.expectf(t, wpid != -1, "waitpid() failure: %v", posix.strerror()) {
 				return false
 			}