catch null vfork_exec_wrapper before it is too late

This commit is contained in:
Paul Davis 2014-07-11 09:58:45 -04:00
parent af2ee58e07
commit 94e0841625

View file

@ -805,6 +805,10 @@ SystemExec::start (int stderr_mode, const char *vfork_exec_wrapper)
#else
signal(SIGPIPE, SIG_DFL);
#endif
if (!vfork_exec_wrapper) {
error << _("Cannot start external process, no vfork wrapper") << endmsg;
return -1;
}
int good_fds[2] = { pok[1], -1 };
close_allv(good_fds);