Import of r39590 from trunk. Centralize istty() into TerminalConfigUnix::IsInteractive(). Add check for terminal foreground process group to know whether we can write (istty() is not enough), see r32454. Fixes root -l -b script.C &
Changed paths: