static pid_t xfork(uchar_t flag)
{
- int status;
pid_t p = fork();
struct sigaction dfl_act = {.sa_handler = SIG_DFL};
/* This is the parent waiting for the child to create grandchild */
if (flag & F_NOWAIT)
- waitpid(p, &status, 0);
+ waitpid(p, NULL, 0);
if (p == -1)
perror("fork");
}
/* In parent */
- waitpid(pid, &tmp, 0);
+ waitpid(pid, NULL, 0);
close(pipefd[1]);
if (!page) {
}
/* In parent */
- waitpid(pid, &tmp, 0);
+ waitpid(pid, NULL, 0);
close(pipefd[0]);
return NULL;
close(rfd);
/* wait for the child to finish. no zombies allowed */
- waitpid(p, &rfd, 0);
+ waitpid(p, NULL, 0);
refresh();