fix regression involving read from scripts

Fixes #4206
This commit is contained in:
Kurtis Rader
2017-07-15 21:21:24 -07:00
parent f2c8e73891
commit 5dc78dd858
5 changed files with 11 additions and 3 deletions

View File

@@ -1563,10 +1563,10 @@ static bool check_for_orphaned_process(unsigned long loop_count, pid_t shell_pgi
/// Initialize data for interactive use.
static void reader_interactive_init() {
assert(input_initialized);
// See if we are running interactively.
pid_t shell_pgid;
if (!input_initialized) init_input();
kill_init();
shell_pgid = getpgrp();