From owner-freebsd-questions Wed Jul 24 06:20:33 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA18422 for questions-outgoing; Wed, 24 Jul 1996 06:20:33 -0700 (PDT) Received: from sergio.lenzi ([200.247.20.44]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA18414 for ; Wed, 24 Jul 1996 06:20:25 -0700 (PDT) Received: (from lenzi@localhost) by sergio.lenzi (8.7.5/8.7.3) id KAA01467; Wed, 24 Jul 1996 10:21:10 GMT Date: Wed, 24 Jul 1996 10:21:09 +0000 () From: "Lenzi, Sergio" X-Sender: lenzi@sergio.lenzi To: amnuay muthitacharoen cc: freebsd-questions@freebsd.org Subject: Re: Shared varibles between processes In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Wed, 24 Jul 1996, amnuay muthitacharoen wrote: > How can I write C program to use varibles that can be shared > beween processes? Use the shared memory feature of the OS. man shmget.. k=shmget(....) this whill create a shared memory with an identifier->k x=shmat(k,...) this will attach that shared memory to an identifier(char *) type. On another process, do the same code, and the memory portion will be shared between process... Hope this will help...