foregroundproc
int foregroundproc(void);
if (isatty(fileno(ttyout)) && !dumb_terminal && foregroundproc())
if (foregroundproc() || progress == -1)