diff --git a/script/src/v2_scheduler.rs b/script/src/v2_scheduler.rs index ae62f0533b..ddfa83ab04 100644 --- a/script/src/v2_scheduler.rs +++ b/script/src/v2_scheduler.rs @@ -547,7 +547,7 @@ impl (), diff --git a/script/testdata/spawn_cases b/script/testdata/spawn_cases index 4b864816df..06ee2e2349 100755 Binary files a/script/testdata/spawn_cases and b/script/testdata/spawn_cases differ diff --git a/script/testdata/spawn_cases.c b/script/testdata/spawn_cases.c index 33d983b54c..712cace0d0 100644 --- a/script/testdata/spawn_cases.c +++ b/script/testdata/spawn_cases.c @@ -307,8 +307,14 @@ int child_read_then_close() { CHECK(err); uint8_t data[8]; size_t data_len = sizeof(data); + // first read to return 0 byte without error + err = ckb_read(fds[CKB_STDIN], data, &data_len); + CHECK(err); + CHECK2(data_len == 0, -2); + // second read to return error(other end closed) err = ckb_read(fds[CKB_STDIN], data, &data_len); CHECK2(err == CKB_OTHER_END_CLOSED, -2); + err = 0; exit: return err;