exec to only warn on background jobs in interactive sessions

Extension of fix for #5449 in b007248
This commit is contained in:
ridiculousfish 2019-01-20 13:52:03 -08:00
parent c66b3128ec
commit 2a190c6f3b

View file

@ -775,7 +775,7 @@ parse_execution_result_t parse_execution_context_t::populate_plain_process(
// Protect against exec with background processes running
static uint32_t last_exec_run_counter = -1;
if (process_type == INTERNAL_EXEC) {
if (process_type == INTERNAL_EXEC && shell_is_interactive()) {
job_iterator_t jobs;
bool have_bg = false;
const job_t *bg = nullptr;