p = fork();
if (p > 0)
- _exit(0);
+ _exit(EXIT_SUCCESS);
else if (p == 0) {
signal(SIGHUP, SIG_DFL);
signal(SIGINT, SIG_DFL);
}
perror("fork");
- _exit(0);
+ _exit(EXIT_FAILURE);
}
/* so they can be used to stop the child */
pid = xfork(flag);
if (pid == 0) {
if (dir && chdir(dir) == -1)
- _exit(1);
+ _exit(EXIT_FAILURE);
/* Suppress stdout and stderr */
if (flag & F_NOTRACE) {
}
execvp(*argv, argv);
- _exit(1);
+ _exit(EXIT_SUCCESS);
} else {
retstatus = join(pid, flag);
dup2(pipefd[1], STDERR_FILENO);
close(pipefd[1]);
execlp(file, file, arg1, arg2, NULL);
- _exit(1);
+ _exit(EXIT_SUCCESS);
}
/* In parent */
dup2(pipefd[0], STDIN_FILENO);
close(pipefd[0]);
spawn(pager, NULL, NULL, NULL, F_CLI);
- _exit(1);
+ _exit(EXIT_SUCCESS);
}
/* In parent */
int wfd = open(g_pipepath, O_WRONLY | O_NONBLOCK);
if (wfd == -1)
- return FALSE;
+ _exit(EXIT_FAILURE);
if (!cmd_as_plugin) {
/* Generate absolute path to plugin */
run_cmd_as_plugin(*path, file, runfile, flags);
close(wfd);
- _exit(0);
+ _exit(EXIT_SUCCESS);
}
int rfd = open(g_pipepath, O_RDONLY);
/* Exit if parent has exited */
if (getppid() == 1) {
free(mark);
- _exit(0);
+ _exit(EXIT_FAILURE);
}
/* If CWD is deleted or moved or perms changed, find an accessible parent */