From owner-freebsd-current Sat Feb 1 05:51:23 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA21499 for current-outgoing; Sat, 1 Feb 1997 05:51:23 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id FAA21488 for ; Sat, 1 Feb 1997 05:51:20 -0800 (PST) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id OAA05284 for current@freebsd.org; Sat, 1 Feb 1997 14:51:18 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.6.9) id OAA20006; Sat, 1 Feb 1997 14:37:21 +0100 (MET) Message-ID: Date: Sat, 1 Feb 1997 14:37:20 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: current@freebsd.org Subject: Re: device driver open semantics... References: <3050.854800300@critter.dk.tfs.com> X-Mailer: Mutt 0.55-PL10 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <3050.854800300@critter.dk.tfs.com>; from Poul-Henning Kamp on Feb 1, 1997 13:31:40 +0100 Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Poul-Henning Kamp wrote: > I realize that changing this behaviour in general would > probably surprise most if not all of our device-drivers, > So we're probably talking about a per-driver flag or possibly > a different open/close entry point in the [cb]devsw structure. This would at least break with the tradition of any Unix system i know of. Is there any historian among us who knows why this tradition started the way it is? So it would violate the principle of least surprise. A separate halfclose() entry might be less surprising... (or notify_close). It would make some drivers indeed more happy. I remember the dreaded /dev/console problems that also could have been solved better if the driver got notified about each close. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)