From owner-freebsd-current@FreeBSD.ORG Tue Sep 26 18:21:27 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 8B2BF16A519 for ; Tue, 26 Sep 2006 18:21:27 +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 F030743D4C for ; Tue, 26 Sep 2006 18:21:26 +0000 (GMT) (envelope-from bmr@google.com) Received: from zps37.corp.google.com (zps37.corp.google.com [172.25.146.37]) by smtp-out.google.com with ESMTP id k8QILQRs004272 for ; Tue, 26 Sep 2006 11:21:26 -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=gDQjtI4gxQK0G9OwAd04jQTD7s8gTXjky740tGkefABQhLyuxUZhkysborqHPqwSA aMxoikITwS/ABn55A4sJA== Received: from smtp-out2.google.com (fpr16.prod.google.com [10.253.18.16]) by zps37.corp.google.com with ESMTP id k8QI4NeP000939 for ; Tue, 26 Sep 2006 11:21:22 -0700 Received: by smtp-out2.google.com with SMTP id 16so243080fpr for ; Tue, 26 Sep 2006 11:21:22 -0700 (PDT) Received: by 10.253.16.13 with SMTP id 13mr892296fpp; Tue, 26 Sep 2006 11:21:22 -0700 (PDT) Received: by 10.253.14.15 with HTTP; Tue, 26 Sep 2006 11:21:17 -0700 (PDT) Message-ID: <4f674ca50609261121v5ed0b2dalad3607634c965271@mail.google.com> Date: Tue, 26 Sep 2006 20:21:17 +0200 From: "Magnus Ringman" To: "Brandon S. Allbery KF8NH" In-Reply-To: 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> <4f674ca50609261029s76432971yfc15171a3e89cb72@mail.google.com> <8EECEF0C-8C94-4A7C-862A-633F67D3D229@ece.cmu.edu> <4f674ca50609261109s78a26d3dh1dd0a6dc8c112ca2@mail.google.com> Cc: current@freebsd.org 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 18:21:27 -0000 On 9/26/06, Brandon S. Allbery KF8NH wrote: > > On Sep 26, 2006, at 14:09 , Magnus Ringman wrote: > > > Methinks Sir has it the wrong way around! > > Hangup on a hardware device -doesn't- void a program's access to the > > device. It just (optionally) sends the process a SIGHUP. That is why > > somebody (iirc, for SunOS < 5) invented vhangup(2) as a means for a > > new session owner to insure it was the only process using the > > terminal. > > I think you misunderstood: yes, physically you do not lose access, > but for security reasons *logically you should*, and that is why > vhangup() was invented. And, this being done, it is also a > reasonable --- and, more to the point, consistent --- model for what > happens when a pty slave loses its master (which *is* equivalent to > physically losing access). Ah, yes - my bad. We agree! My poor brain stem objected to the use of SIGHUP for losing master, on grounds that a hangup is a perfetly valid terminal event. Invalidating the fd is the important point. Magnus