Page MenuHomeFreeBSD

D2674.id5807.diff
No OneTemporary

D2674.id5807.diff

Index: tests/sys/kern/ptrace_test.c
===================================================================
--- tests/sys/kern/ptrace_test.c
+++ tests/sys/kern/ptrace_test.c
@@ -304,7 +304,7 @@
ATF_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c));
/* Wait for parent's failed wait. */
- ATF_REQUIRE(read(dpipe[1], &c, sizeof(c)) == 0);
+ ATF_REQUIRE(read(dpipe[1], &c, sizeof(c)) == sizeof(c));
wpid = waitpid(child, &status, 0);
ATF_REQUIRE(wpid == child);
@@ -313,6 +313,7 @@
exit(0);
}
+ close(dpipe[1]);
/* Parent process. */
@@ -365,10 +366,11 @@
ATF_REQUIRE(wpid == 0);
/* Signal the debugger to wait for the child. */
- close(dpipe[0]);
+ ATF_REQUIRE(write(dpipe[0], &c, sizeof(c)) == sizeof(c));
/* Wait for the debugger. */
- ATF_REQUIRE(read(dpipe[1], &c, sizeof(c)) == 0);
+ ATF_REQUIRE(read(dpipe[0], &c, sizeof(c)) == 0);
+ close(dpipe[0]);
/* The child process should now be ready. */
wpid = waitpid(child, &status, WNOHANG);

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 17, 4:25 AM (17 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31638631
Default Alt Text
D2674.id5807.diff (987 B)

Event Timeline