From owner-freebsd-hackers Thu Feb 5 16:37:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA09095 for hackers-outgoing; Thu, 5 Feb 1998 16:37:16 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA09086 for ; Thu, 5 Feb 1998 16:37:09 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id AAA09085; Fri, 6 Feb 1998 00:37:04 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id BAA00716; Fri, 6 Feb 1998 01:36:59 +0100 (MET) Message-ID: <19980206013659.03288@follo.net> Date: Fri, 6 Feb 1998 01:36:59 +0100 From: Eivind Eklund To: Terry Lambert Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Shared memory and signals References: <19980206012232.55341@follo.net> <199802060031.RAA16316@usr02.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88e In-Reply-To: <199802060031.RAA16316@usr02.primenet.com>; from Terry Lambert on Fri, Feb 06, 1998 at 12:31:51AM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" On Fri, Feb 06, 1998 at 12:31:51AM +0000, Terry Lambert wrote: > > > If you use an mmap'ed file instead of a SysV SHM segment, then you > > > will get resource-tracking cleanup after the last close, like you > > > wanted. The file will stick around, but you can unlink it and use > > > UNIX domain sockets to pass the descriptor between processes, if this > > > is a problem. > > > > Any particular reason not to mmap() /dev/zero? I though that was considered > > the way to do this, instead of unlinking. > > You have to pass sockets around instead of everyone just opening > the same file... What I meant was that it would probably be preferable to mmap /dev/zero and pass that descriptor around, instead of creating a file, mmaping it, unlinking it, and pass _that_ descriptor around. Unless there is something I'm really missing here. I've always used fork() to get the descriptor passed easily, anyway :-) Eivind.