From mboxrd@z Thu Jan 1 00:00:00 1970 From: One Thousand Gnomes Subject: Re: [PATCH] tty: Only hangup once Date: Mon, 18 Nov 2013 13:42:11 +0000 Message-ID: <20131118134211.17861db3@alan.etchedpixels.co.uk> References: <1375293945-4087-1-git-send-email-peter@hurleysoftware.com> <20131117203850.46df2124@tormoz-pc> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:33415 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880Ab3KRNmU (ORCPT ); Mon, 18 Nov 2013 08:42:20 -0500 In-Reply-To: <20131117203850.46df2124@tormoz-pc> Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Heorhi Valakhanovich Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, gregkh@linuxfoundation.org > After upgrading to kernel 3.12 I noticed one issue with tmux software. > The easiest way to reproduce will be: > 1. Start tmux session as root. > 2. Connect via ssh and use "tmux attach" to attach to the running > session. > 3. Kill ssh client. > > You can notice that shell (zsh in my case) and "tmux attach" are still > remains in process' list. That didn't happen in previous kernels. > I've tried to bisect this in kernel sources and found commit > cb50e5235b8ae5aa0fe422eaaa8e444024c5bd98 which contains this exact > patch. I have not enough experience to investigate more so most likely > I will not find anything more. But it will be good if someone more > experienced will have a look at it. The patch should be reverted. The submission gives no reason that the patch was required - it just adds code and optimises a path that doesn't need optimising anyway. It's theoretically true you only need one hangup, unfortunately however I think it has to be the *last* hangup not the first or there are races between the tty code and the process group handling. Alan