diff --git a/src/config/options.inc b/src/config/options.inc index c7e331f0..cbdd97a8 100644 --- a/src/config/options.inc +++ b/src/config/options.inc @@ -1383,7 +1383,9 @@ static union option_info config_options_info[] = { "confirm_close", 0, 0, N_("When closing a tab show confirmation dialog.")), - + INIT_OPT_BOOL("ui", N_("Whether to disallow writing to terminal"), + "tostop", 0, 1, + N_("Whether to disallow writing to terminal by background processes.")), INIT_OPT_LANGUAGE("ui", N_("Language"), "language", 0, diff --git a/src/terminal/kbd.c b/src/terminal/kbd.c index 83466248..bf70709f 100644 --- a/src/terminal/kbd.c +++ b/src/terminal/kbd.c @@ -261,7 +261,7 @@ setraw(struct itrm *itrm, int save_orig) elinks_cfmakeraw(&t); t.c_lflag |= ISIG; #ifdef TOSTOP - t.c_lflag |= TOSTOP; + t.c_lflag |= get_opt_bool("ui.tostop", NULL) ? TOSTOP : 0; #endif t.c_oflag |= OPOST; if (tcsetattr(itrm->in.ctl, TCSANOW, &t)) return -1;