X-Spam-Check-By: sourceware.org Message-ID: <441633FA.6010007@cygwin.com> Date: Mon, 13 Mar 2006 22:09:46 -0500 From: "Larry Hall (Cygwin)" Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051223 Fedora/1.5-0.2.fc4.remi Thunderbird/1.5 Mnenhy/0.7.3.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: 1.5.19-4 Problem with compiled source References: <44162221 DOT 2000508 AT verizon DOT net> In-Reply-To: <44162221.2000508@verizon.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Rich Mayo wrote: > I am attempting to compile and run a very simple shared memory server > and client. Although my source compiles with no problem, when I attempt > to execute, the following is my only output: > > Bad system call > > I have conducted some experiments and the problem occurs with the very > first line in my code. The following is the server code up to line that > causes the error: > > /* shm_server.c: Server program to demonstrate shared memory. */ > > #include "shm_server.h" > > int main(void) > { > char * shm = NULL; // Shared Memory Pointer > char * s = NULL; // Dynamic Pointer > > key_t key = 5678; // shared memory segment name is '5678' > char c; // Temporary char > int shmid; // Shared Memory Segment ID > > /* Create the segment. */ > if ((shmid = shmget (key, SHMSZ, IPC_CREAT | 0666)) < 0) > { > fprintf (stderr, "shmget failed\n"); > exit (1); > } > > ... > > There appears to be something wrong with "shmget". Any suggestions?? > > Absolutely! Check out the section in the User's Guide regarding cygserver . -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/