}
static int run_editor(char **paths) {
- pid_t pid;
int r;
assert(paths);
- r = safe_fork("(editor)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid);
+ r = safe_fork("(editor)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG|FORK_WAIT, NULL);
if (r < 0)
return r;
if (r == 0) {
_exit(EXIT_FAILURE);
}
- r = wait_for_terminate_and_check("editor", pid, WAIT_LOG);
- if (r < 0)
- return r;
-
return 0;
}