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 60ced5dbc7
commit 1ce9721590

View file

@ -768,7 +768,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;