From owner-freebsd-hackers Wed Dec 18 15:58:16 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id PAA12299 for hackers-outgoing; Wed, 18 Dec 1996 15:58:16 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id PAA12288 for ; Wed, 18 Dec 1996 15:58:13 -0800 (PST) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.2/8.7.3) id KAA01883; Thu, 19 Dec 1996 10:27:56 +1030 (CST) From: Michael Smith Message-Id: <199612182357.KAA01883@genesis.atrad.adelaide.edu.au> Subject: Re: mmap pain In-Reply-To: <32B7E11E.22@wgold.demon.co.uk> from James Mansion at "Dec 18, 96 12:18:38 pm" To: james@wgold.demon.co.uk (James Mansion) Date: Thu, 19 Dec 1996 10:27:55 +1030 (CST) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk James Mansion stands accused of saying: > > Is there any (preferably generic) way to tell whether a file > has no (other) open descriptors attached to it and can be unlinked? Um, if you unlink it and someone else has it open, that's not going to hurt them; it'll disappear from the filesystem namespace (as intended), but will still exist until they close it or exit. It's actually quite common to mmap a file for parent/child communication, unlink it and then fork. > James -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[