From owner-freebsd-current Tue Oct 15 13:52:20 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA07847 for current-outgoing; Tue, 15 Oct 1996 13:52:20 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id NAA07840 for ; Tue, 15 Oct 1996 13:52:16 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id WAA11150 for ; Tue, 15 Oct 1996 22:51:14 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id WAA15388 for freebsd-current@FreeBSD.org; Tue, 15 Oct 1996 22:51:14 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.6/8.6.9) id WAA13617 for freebsd-current@FreeBSD.org; Tue, 15 Oct 1996 22:44:02 +0200 (MET DST) From: J Wunsch Message-Id: <199610152044.WAA13617@uriah.heep.sax.de> Subject: Re: device driver open/close inconsistency To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Tue, 15 Oct 1996 22:44:02 +0200 (MET DST) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <193.845397271@critter.tfs.com> from Poul-Henning Kamp at "Oct 15, 96 06:34:31 pm" 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 X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk As Poul-Henning Kamp wrote: > Why do we call a device-driver->open() on all opens, but only ->close() > once on the last close ? You can open it multiple times (it stays open meanwhile), but only close it once. Certainly, it's mostly history. It made the console code (not the syscons/pcvt/sio stuff, just the real console) rather hard. Some people might still remember the ``syscons freezes during the nightly syslogd restart'' syndrome... Julian's comment regarding forks is certainly also part of the game. -- 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. ;-)