public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arseny Maslennikov <ar@cs.msu.ru>
To: Pavel Machek <pavel@ucw.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org,
	"Vladimir D . Seleznev" <vseleznv@altlinux.org>
Subject: Re: [PATCH 0/7] TTY Keyboard Status Request
Date: Sun, 9 Jun 2019 22:40:14 +0300	[thread overview]
Message-ID: <20190609194013.GA3736@cello> (raw)
In-Reply-To: <20190609174139.GA11944@xo-6d-61-c0.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]

On Sun, Jun 09, 2019 at 07:41:39PM +0200, Pavel Machek wrote:
> Hi!
> 
> > This patch series introduces TTY keyboard status request, a feature of
> > the n_tty line discipline that reserves a character in struct termios
> > (^T by default) and reacts to it by printing a short informational line
> > to the terminal and sending a Unix signal to the tty's foreground
> > process group. The processes may, in response to the signal, output a
> > textual description of what they're doing.
> > 
> > The feature has been present in a similar form at least in
> > Free/Open/NetBSD; it would be nice to have something like this in Linux
> > as well. There is an LKML thread[1] where users have previously
> > expressed the rationale for this.
> > 
> > The current implementation does not break existing kernel API in any
> > way, since, fortunately, all the architectures supported by the kernel
> > happen to have at least 1 free byte in the termios control character
> > array.
> 
> I like the idea... I was often wondering "how long will this dd take". (And in
> case of dd, SIGUSR1 does the job).
> 
> I assume this will off by default, so that applications using ^T today will not
> get surprise signals?
> 									Pavel

If any of isig, icanon and iexten is disabled on the tty, the signal is
not sent.

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.

The commit messages of individual patches try to explain this in detail.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-06-09 19:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05  8:18 [PATCH 0/7] TTY Keyboard Status Request Arseny Maslennikov
2019-06-05  8:19 ` [PATCH 1/7] signal.h: Define SIGINFO on all architectures Arseny Maslennikov
2019-06-10 21:10   ` Rob Landley
2019-06-11 20:36   ` Eric W. Biederman
2019-06-11 22:38     ` Arseny Maslennikov
2019-06-05  8:19 ` [PATCH 2/7] tty: termios: Reserve space for VSTATUS in .c_cc Arseny Maslennikov
2019-06-05  8:19 ` [PATCH 3/7] n_tty: Send SIGINFO to fg pgrp on status request character Arseny Maslennikov
2019-06-05  8:19 ` [PATCH 4/7] linux/signal.h: Ignore SIGINFO by default in new tasks Arseny Maslennikov
2019-06-05  8:19 ` [PATCH 5/7] tty: Add NOKERNINFO lflag to termios Arseny Maslennikov
2019-06-05  8:19 ` [PATCH 6/7] n_tty: ->ops->write: Cut core logic out to a separate function Arseny Maslennikov
2019-06-05  8:19 ` [PATCH 7/7] n_tty: Provide an informational line on VSTATUS receipt Arseny Maslennikov
2019-06-09 17:41 ` [PATCH 0/7] TTY Keyboard Status Request Pavel Machek
2019-06-09 19:40   ` Arseny Maslennikov [this message]
2019-06-09 19:51     ` Pavel Machek
2019-06-09 20:56       ` Arseny Maslennikov
2019-06-10 21:18         ` Rob Landley
2019-06-12  9:41         ` Pavel Machek
2019-06-10 21:06 ` Rob Landley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190609194013.GA3736@cello \
    --to=ar@cs.msu.ru \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=vseleznv@altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox