From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752806AbbBQVuz (ORCPT ); Tue, 17 Feb 2015 16:50:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54065 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbbBQVuy (ORCPT ); Tue, 17 Feb 2015 16:50:54 -0500 Date: Tue, 17 Feb 2015 16:50:46 -0500 From: Aristeu Rozanski To: Peter Hurley Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby Subject: Re: [PATCH] n_tty_read: check for hanging tty while waiting for input Message-ID: <20150217215046.GC13666@redhat.com> References: <20150217210609.GA13666@redhat.com> <54E3B27E.9020506@hurleysoftware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54E3B27E.9020506@hurleysoftware.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On Tue, Feb 17, 2015 at 04:28:30PM -0500, Peter Hurley wrote: > On 02/17/2015 04:06 PM, Aristeu Rozanski wrote: > > If the console has a canonical reader and the respective tty hangs up, > > it'll waste a wake up and will never release the last ldisc reference so > > the hangup process can finish: > > This behavior is by-design; /dev/console cannot be hung-up. hangup is issued on the tty that happens to be the console. In this case, ttyS0. > What process is sleeping on /dev/console read() and what is its controlling > tty? I ask because console teardown usually happens when SIGHUP is > received by the process group. ttyS0 is the controller tty. -- Aristeu