Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 62437 invoked from network); 1 Jun 2007 18:03:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jun 2007 18:03:48 -0000 Received: (qmail 80940 invoked by uid 500); 1 Jun 2007 18:03:50 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 80804 invoked by uid 500); 1 Jun 2007 18:03:50 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 80755 invoked by uid 99); 1 Jun 2007 18:03:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 11:03:50 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [66.92.42.140] (HELO amar.com) (66.92.42.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 11:03:42 -0700 DomainKey-Signature: a=rsa-sha1; s=Amar.com; d=amar.com; c=simple; q=dns; h=message-id:from; b=NiQECqkQU1c9o6vJCDy5oCofzyNYIpMfrI5j6nBNTFY+rwQ5gcreBTEUv7NS XIEzLhpJluGvoXxyV/S3ht4OgvJUE5OARaOBas7O/D/EFwpY5R68+X5pw 5q5uBxE9/+Qp8WUKxjM+DU9rWG41fjPfYaC/Eo9I9dGOcu6Gnn2ztg=; Received: from [127.0.0.1] by amar.com (MDaemon PRO v9.5.2) with ESMTP id 19-md50000000176.msg for ; Fri, 01 Jun 2007 11:03:09 -0700 Message-ID: <46605F54.7080507@amar.com> Date: Fri, 01 Jun 2007 11:03:00 -0700 From: Jacques Amar User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: joshrotenberg@gmail.com CC: APR devlist Subject: Re: Shared Memory Usage Example References: <465EE0A4.9050306@amar.com> <66d719cf0705311110v2b2a3f22j5f99643dee04a696@mail.gmail.com> In-Reply-To: <66d719cf0705311110v2b2a3f22j5f99643dee04a696@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: jac@amar.com X-Spam-Processed: amar.com, Fri, 01 Jun 2007 11:03:09 -0700 (not processed: message from valid local sender) X-Lookup-Warning: EHLO lookup on [127.0.0.1] does not match 67.52.184.1 X-MDRemoteIP: 67.52.184.1 X-Return-Path: jaapr@amar.com X-Envelope-From: jaapr@amar.com X-MDaemon-Deliver-To: dev@apr.apache.org X-MDAV-Processed: amar.com, Fri, 01 Jun 2007 11:03:10 -0700 X-Virus-Checked: Checked by ClamAV on apache.org josh rotenberg wrote: > I haven't looked at them that closely, but it looks like in the APR > distribution there are a few tests that exercise the apr_shm_* stuff, > namely testshm.c, testshmproducer.c, and testshmconsumer.c. Do these > get you anywhere? > > Josh Thanks Josh, I went ahead and did RTFC. It seems that non anonymous shared memory is using memory mapped files, as opposed to the Linux way of using a 16 bit name in a shared memory. It is more susceptible to name clobbering, but eliminates the need to make sure there is a write permissible file available on every client. I guess I will have to implement using good old ipcs shm and one day attempt to emend the apr lib for it. Just not good enough in Windows/Novell environment to make it portable. - Jacques > > On 5/31/07, Jacques Amar wrote: >> I am using apr in a non httpd application. I would like to use a shared >> memory area to pass information between two different standalone >> programs, so I need the shmem to be named. I am trying NOT to resort to >> the built-in Linux shmget. Can anyone point a code example of this being >> done properly. My current example gives me an error 17 => File Exists. >> >> Thanks >> >> >> >>