Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2483704ybi; Sun, 9 Jun 2019 12:57:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqx19gpBtlcqREHPRNgJcirKmXJHi3g3PzLmpZt0kTcZJ7ltoJCC/ZLpwQ7ICbjFm/Fvf4c8 X-Received: by 2002:a17:902:8546:: with SMTP id d6mr58091677plo.207.1560110242465; Sun, 09 Jun 2019 12:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560110242; cv=none; d=google.com; s=arc-20160816; b=eBvDtBlVSFiDl91g1nHwoRGlABxmcOyViVMlXvttUGcp1o3BQXDin1qS9/tIR/RabE GhPaEHRLkZAQnMzFIrWipxBLPlwRk5Y8+MSd0OLRdtBTcoyuO3K8CITJavMQSNU74u1t UjLuxFrzI1MfYiTjcJUCJrrvPcG8N4yVeYbtV4qDF3kDwKv8lnqNcycEw4adH8+vSHyB k4JjJHgzveXktSreX4z6HqZHn+L+L99Jfh9TJXgatsCr5cR3Ck7Cl7yK9H7YvVcUtJ13 nlKBvGFEb5oN4/byk2DQdzV6HOUKGCfE99KLz/N5YN5vfrXcSWMKZZnbaxORzOeuvJKU wKKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nG4kEmXKS5eW66sVor47Ys3E0o/tjr9oDRHqL4XO1tE=; b=Xv/RGkoYNUIkIWos0oLXQ9a3mlHTw7tV8SVTwvhTE4AULlMZuAi7pMyDT6PQEgqr9t pc9LAnkf/rYP3AuEkqk1ScARnVPfMAbPdxQGeNpyhu4lW1FMYZjQIM7wytO+UyVsTowY 0JeNHwzEGs08j/zVfFkYMtRQZY672yRpjClDhoWCGBTdaGCmeu/86jeTYhbNxRxl/Hct 1rLzcGtVseztj3bbXRAUBFjXWH2WQy/6T9Dp9c159OKj7WzVeQDBJu0TUvUkxHsgAJdx EvKU0+Ep2RSF9QihGYYJbQq6BpVIBDaRQ0nCuG2OlrOwHBEi58SjiNhmcsazoNW1yRBl z76A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si8116793plu.126.2019.06.09.12.57.04; Sun, 09 Jun 2019 12:57:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729576AbfFITve (ORCPT + 99 others); Sun, 9 Jun 2019 15:51:34 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:38908 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726950AbfFITve (ORCPT ); Sun, 9 Jun 2019 15:51:34 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 9BD2A802A4; Sun, 9 Jun 2019 21:51:22 +0200 (CEST) Date: Sun, 9 Jun 2019 21:51:32 +0200 From: Pavel Machek To: Arseny Maslennikov Cc: Greg Kroah-Hartman , Jiri Slaby , Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, "Vladimir D . Seleznev" Subject: Re: [PATCH 0/7] TTY Keyboard Status Request Message-ID: <20190609195132.GA1430@amd> References: <20190605081906.28938-1-ar@cs.msu.ru> <20190609174139.GA11944@xo-6d-61-c0.localdomain> <20190609194013.GA3736@cello> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: <20190609194013.GA3736@cello> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 li= ne > > > 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. > > >=20 > > > 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 Lin= ux > > > as well. There is an LKML thread[1] where users have previously > > > expressed the rationale for this. > > >=20 > > > 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. > >=20 > > I like the idea... I was often wondering "how long will this dd take". = (And in > > case of dd, SIGUSR1 does the job). > >=20 > > I assume this will off by default, so that applications using ^T today = will not > > get surprise signals? >=20 > 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 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlz9Y0QACgkQMOfwapXb+vIU7ACfRSaiBYXbA7R8lFC9dxbQPTtK ZogAoIVPIcphBVNpKz5QKwmuob12pU1i =/RPY -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/--