Fixed a bug in bad_waitpid.c
The comments for this particular test suggest that the parent should attempt waiting on itself. However, the code makes the parent wait on its child. Fixed.
This commit is contained in:
@@ -217,7 +217,7 @@ wait_parent(void)
|
||||
report_survival(rv, errno, &result);
|
||||
_exit(0);
|
||||
}
|
||||
rv = waitpid(childpid, &x, 0);
|
||||
rv = waitpid(mypid, &x, 0);
|
||||
report_beginsub("from parent:");
|
||||
report_survival(rv, errno, &result);
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user