Fixed exec failure regression

The process_t pointer sent to setup_child_process can actually be 0
without it being failure, as that is what fish sends when `exec` is run
(in the case of INTERNAL_EXEC).

This was causing exec to fail.
This commit is contained in:
Mahmoud Al-Qudsi 2017-07-27 13:48:03 -05:00 committed by Kurtis Rader
parent 9f2addcf27
commit 8b8a21dcad

View File

@ -250,8 +250,9 @@ static int handle_child_io(const io_chain_t &io_chain) {
}
int setup_child_process(job_t *j, process_t *p, const io_chain_t &io_chain) {
bool ok = false;
bool ok = true;
//p is zero when EXEC_INTERNAL
if (p) {
ok = child_set_group(j, p);
}