test cleanup

This commit is contained in:
Paul Sajna
2018-03-15 16:18:35 -07:00
parent cdfde8c0d4
commit c568ca2932
+8 -7
View File
@@ -5,12 +5,13 @@
int main(int argc, char** argv) {
pid_t pid = fork();
if (pid == 0) {
// child
sleep(1);
exit(0);
} else {
// parent
int stat_loc;
waitpid(pid, &stat_loc, 0);
// child
sleep(1);
exit(0);
} else {
// parent
int stat_loc;
waitpid(pid, &stat_loc, 0);
}
return 0;
}