[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190612094108.GA11439@amd>
Date: Wed, 12 Jun 2019 11:41:08 +0200
From: Pavel Machek <pavel@...x.de>
To: Arseny Maslennikov <ar@...msu.ru>
Cc: Pavel Machek <pavel@...x.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org,
"Vladimir D . Seleznev" <vseleznv@...linux.org>
Subject: Re: [PATCH 0/7] TTY Keyboard Status Request
Hi!
> > > If any of isig, icanon and iexten is disabled on the tty, the signal is
> > > not sent.
> >
> > As expected.
> >
> > > Any application that wants to handle raw terminal input events itself,
> > > e.g. vim, mutt, libreadline, anything ncurses-based, etc., has to turn
> > > off the tty's cooked mode, i.e. at least icanon. This means those
> > > applications are unaffected.
> >
> > Agreed, those are unaffected.
> >
> > But if I have an application doing read() from console (without
> > manipulating tty), am I going to get surprise signal when user types
> > ^T?
> >
> > Pavel
>
> As of now, that application will indeed receive a signal that is
> guaranteed to be ignored by default.
>
> This is similar to SIGWINCH, which is default-ignored as well: if the
> terminal width/height changes (like when a terminal emulator window is
> resized), its foreground pgrp gets a surprise signal as well, and the
> processes that don't care about WINCH (and thus have default
> disposition) do not get confused.
> E.g. 'strace cat' demonstrates this quite clearly.
Ok, so this should be safe as long as noone listens for SIGPWR. So
... I guess we are ok :-).
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists