From owner-freebsd-current@FreeBSD.ORG Tue Sep 26 17:29:13 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 784DF16A407 for ; Tue, 26 Sep 2006 17:29:13 +0000 (UTC) (envelope-from bmr@google.com) Received: from smtp-out.google.com (smtp-out.google.com [216.239.45.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAD8443D5D for ; Tue, 26 Sep 2006 17:29:08 +0000 (GMT) (envelope-from bmr@google.com) Received: from zps38.corp.google.com (zps38.corp.google.com [172.25.146.38]) by smtp-out.google.com with ESMTP id k8QHT5Bx015826 for ; Tue, 26 Sep 2006 10:29:05 -0700 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:message-id:date:from:to:subject:cc:in-reply-to: mime-version:content-type:content-transfer-encoding: content-disposition:references; b=H7o4zYI1no5jw3wUs3i04A76u1Qx+/rG2cBs40j4uaubJDL6e0WcOjjbpEVL0BzA3 sRCus1zM9B0Lcxu6argrA== Received: from smtp-out2.google.com (fpr16.prod.google.com [10.253.18.16]) by zps38.corp.google.com with ESMTP id k8QHOaI3001121 for ; Tue, 26 Sep 2006 10:29:03 -0700 Received: by smtp-out2.google.com with SMTP id 16so275724fpr for ; Tue, 26 Sep 2006 10:29:03 -0700 (PDT) Received: by 10.253.31.16 with SMTP id e16mr870868fpe; Tue, 26 Sep 2006 10:29:02 -0700 (PDT) Received: by 10.253.14.15 with HTTP; Tue, 26 Sep 2006 10:29:02 -0700 (PDT) Message-ID: <4f674ca50609261029s76432971yfc15171a3e89cb72@mail.google.com> Date: Tue, 26 Sep 2006 19:29:02 +0200 From: "Magnus Ringman" To: current@freebsd.org In-Reply-To: <98FD6058-7220-48DB-AC24-F989FCB2AE11@ece.cmu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060926111452.J91466@godot.imp.ch> <0C4B0125-11AA-4BDB-A4E3-163A6194AB68@alumni.cwru.edu> <98FD6058-7220-48DB-AC24-F989FCB2AE11@ece.cmu.edu> Cc: Justin Hibbits Subject: Re: What do you think ?: How should pseundo terminals behave ... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2006 17:29:13 -0000 On 9/26/06, Brandon S. Allbery KF8NH wrote: > > 3a) Hangup all processes attached to the client and switch them to > some kind of "dead" inode (which could be a fixed entity since all > operations on it except close() fail). (Don't real ttys do this?) -1. Yes and no. ttys do that on an actual hangup (when a hardware hangup happens), however PTYs are intended to allow emulating the full terminal line semantics, including hangup. Imo the case of "pty master side disappearing" is equivalent to "backing device (hardware) no longer exists", not "remote end hung up". Some OSes have a vhangup(2) call, which when called on an open device will send a hangup to all controlled processes, possibly also substituting a dead fd. One idea might be to allow pty pairs a "generation" concept, and have slave side lose the fd when the master side is close Magnus