From owner-freebsd-hackers Thu Feb 5 22:56:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA13209 for hackers-outgoing; Thu, 5 Feb 1998 22:56:03 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from safeconcept.utimaco.co.at (mail-gw.utimaco.co.at [195.96.28.162]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA13182 for ; Thu, 5 Feb 1998 22:55:51 -0800 (PST) (envelope-from Michael.Schuster@utimaco.co.at) Received: (from uucp@localhost) by safeconcept.utimaco.co.at (8.8.5/8.8.5) id HAA09242 for ; Fri, 6 Feb 1998 07:36:16 +0100 (CET) Received: from ultra1.utimaco.co.at(10.0.0.32) by safeconcept via smap (V2.0) id xma009240; Fri, 6 Feb 98 07:35:45 +0100 Message-ID: <34DAB34B.DD7FFC63@utimaco.co.at> Date: Fri, 06 Feb 1998 07:52:59 +0100 From: Michael Schuster Organization: Utimaco Safe Concept GmbH. Linz Austria X-Mailer: Mozilla 4.04 [en] (X11; I; SunOS 5.5.1 sun4u) MIME-Version: 1.0 To: "hackers@FreeBSD.ORG" Subject: Re: Shared memory and signals Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" Dennis Rockwell wrote > On 4 Feb, Michael Schuster wrote: > > if (sInfo.shm_nattch > 1) > > shmctl (fd, IPC_RMID, NULL); > > Isn't this backwards? (nattach <= 1) Yes, of course. I mixed things up there. What I had in the first place was if (sInfo.shm_nattch > 1) free_mem = FALSE; thanks for the hint. > Also, this looks like a race condition just waiting to be lost. Could you elaborate? -- Michael Schuster