From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751333AbdH1OhJ (ORCPT ); Mon, 28 Aug 2017 10:37:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44772 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbdH1OhI (ORCPT ); Mon, 28 Aug 2017 10:37:08 -0400 Date: Mon, 28 Aug 2017 16:37:13 +0200 From: Greg KH To: Masatake YAMATO Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] pty: show associative slave of ptmx in fdinfo Message-ID: <20170828143713.GA28831@kroah.com> References: <20170717212759.21938-1-yamato@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170717212759.21938-1-yamato@redhat.com> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 18, 2017 at 06:27:59AM +0900, Masatake YAMATO wrote: > This patch adds "tty-index" field to /proc/PID/fdinfo/N if N > specifies /dev/ptmx. The field shows the index of associative > slave pts. > > Though a minor number is given for each pts instance, ptmx is not. > It means there is no way in user-space to know the association between > file descriptors for pts/n and ptmx. (n = 0, 1, ...) > > This is different from pipe. About pipe such association can be solved > by inode of pipefs. > > Providing the way to know the association between pts/n and ptmx helps > users understand the status of running system. lsof can utilize this field. > > Signed-off-by: Masatake YAMATO > --- > drivers/tty/pty.c | 8 +++++++- > drivers/tty/tty_io.c | 9 +++++++++ > include/linux/tty_driver.h | 2 ++ > 3 files changed, 18 insertions(+), 1 deletion(-) Sorry for the delay, now applied. greg k-h