From 8b8a21dcad2505aec15753f308045ae739eda918 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Thu, 27 Jul 2017 13:48:03 -0500 Subject: [PATCH] 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. --- src/postfork.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/postfork.cpp b/src/postfork.cpp index 6832d748e..999324bd1 100644 --- a/src/postfork.cpp +++ b/src/postfork.cpp @@ -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); }