Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5450548ybi; Wed, 12 Jun 2019 02:43:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnua0Z3YXK9FaHppHF/AcpexOvztzzk/qSzx97LGDpya0kgdwMmrJuaXjxyB7nFaOsa/QX X-Received: by 2002:a63:fd50:: with SMTP id m16mr24274208pgj.192.1560332612213; Wed, 12 Jun 2019 02:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560332612; cv=none; d=google.com; s=arc-20160816; b=ljCGUmhEZJ2GM9EbRDG6mskmrOgOWHkM2A54Ddro+JGJM7XKPU6JT4W/S3G8k94oJ1 ebz4Xl3skiSKlTaxiN4URXwxGckWwHjpPzpvHXn54HwiOIKSz2d1ZTQkDxu/B7cHdufB wYqleFoA49WWQ0UH4shUf2onktVCg1V+m8tR1FBevTtSnKA15ee7QeyW096g2+nEKUp4 U2CMSwIAHQq9wbK4AMjPaTWfVhA72KcL/r83I5XMpY5xCC5XWtfKipjoybIrRfcGYMaQ C1aFVWr3wv1f2Q7W0pD0YSIfuQ9hTpPsOwD0Xzs+WXVh/WOGSp4W+OVJLrjBsYeVDzIV UcSA== 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=xNgkdYv7zY/05j8o5PAi4vAHiGt1XTt7z6uf7xXjYzA=; b=taljrdkNbUHSwESXz+JE51lE8LYeeqIkIgtIh8WShL0rICmjuDiqtdVXu6Brq5vM9R U6yjQSWDN9rp44FZ+R3jXEPHYBuEZw7ZMDPswC8HMTpgfi5uHxvXYbAy6iHqUolnnc5B fXl8ZSbVXg+Oo6kO6nXVU09ZtGN+Cy1GKZhOjwd2ANcbv5UmM4oleL60Pcceqrm3lvUq g9CkRokynwRKrwfSmgxXO8AsNMVP8fmJfNheW4Z4JJMS9JeU2WMWDRoW4+ieUyRYa/4w jTgQMuDsC5LQ1bPcs64LQg1ldwkezPe9wXV74EC3a0ZvdzJ8Nf4Tq2mRqhndkmi412NZ aA6w== 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 c9si4913448pjr.16.2019.06.12.02.43.15; Wed, 12 Jun 2019 02:43:32 -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 S2437559AbfFLJlM (ORCPT + 99 others); Wed, 12 Jun 2019 05:41:12 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:37762 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfFLJlM (ORCPT ); Wed, 12 Jun 2019 05:41:12 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 09883802E0; Wed, 12 Jun 2019 11:40:58 +0200 (CEST) Date: Wed, 12 Jun 2019 11:41:08 +0200 From: Pavel Machek To: Arseny Maslennikov Cc: Pavel Machek , 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: <20190612094108.GA11439@amd> References: <20190605081906.28938-1-ar@cs.msu.ru> <20190609174139.GA11944@xo-6d-61-c0.localdomain> <20190609194013.GA3736@cello> <20190609195132.GA1430@amd> <20190609205610.GB3736@cello> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <20190609205610.GB3736@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 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > If any of isig, icanon and iexten is disabled on the tty, the signal = is > > > not sent. > >=20 > > As expected. > >=20 > > > 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. > >=20 > > Agreed, those are unaffected. > >=20 > > But if I have an application doing read() from console (without > > manipulating tty), am I going to get surprise signal when user types > > ^T? > >=20 > > Pavel >=20 > As of now, that application will indeed receive a signal that is > guaranteed to be ignored by default. >=20 > 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 =2E.. I guess we are ok :-). Pavel --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl0AyLQACgkQMOfwapXb+vJFlQCguETfJ+hTMGE/wltRVEKeEcrm q1YAmwfrv5HKtICh2anxucyqQHW3eFNN =TVS/ -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--