delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/23/19:11:02

X-Spam-Check-By: sourceware.org
Date: Fri, 23 Jun 2006 19:10:52 -0400 (EDT)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Rahul Gulati <rgulatius AT yahoo DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Issue with shmget
In-Reply-To: <20060623220054.82828.qmail@web34209.mail.mud.yahoo.com>
Message-ID: <Pine.GSO.4.63.0606231906540.17558@access1.cims.nyu.edu>
References: <20060623220054 DOT 82828 DOT qmail AT web34209 DOT mail DOT mud DOT yahoo DOT com>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Fri, 23 Jun 2006, Rahul Gulati wrote:

> Hi,
>
> I am new to cygwin and trying to port existng Linux
> based implementation of shared memory on cygwin.
>
> I am having issues with shmget call. I tried to debug
> and found out that everytime I try to call shmget
> function I get an error and the main thread exits:
> Program exited with code 06000
>
> I checked cygwin documentation and mailing lists:
> I have ipc-daemon2 running

FYI, ipc-daemon2 is now obsolete, and unless you have an unofficial
package that depends on it, I suggest you stop it, as it's only wasting
system resources.

> cygserver is also running with default options which
> includes :
> XSI IPC Shared Memory support.
>
> Would appreciate if someone could point out what is
> the real issue.
>
> Thanks...
> Rahul
>
> ps -aef output::
>
>  rgulati    2984    3980 con  15:04:43
> /usr/bin/ipc-daemon2
>   SYSTEM    2088       1   ?  17:31:08
> /usr/bin/cygrunsrv
>   SYSTEM    2796    2088   ?  17:31:08
> /usr/sbin/cygserver
>  rgulati    3852    1432 con  17:59:05 /usr/bin/ps
>
>
> Here is a snippet of my code:
>
> int main{)
> {
>    int     i;
>    for (i=0; i<SHM_TAB_SZ; i++) {
>       shm_tab[i].free=1;
>    }
>    shm_id = shmget(LOADGEN_SHM_KEY, SHM_TAB_SZ*sizeof(SHM_DATA),
>                    0777|IPC_CREAT);
>    if (shm_id <0) {
>       if (debug) printf("\nLGEN:shmget failed...\n");
>          perror("LGEN:shmget:");
>    }
> }

Not nearly enough information, the problem reporting guidelines at
<http://cygwin.com/problems.html> were not followed (e.g., no attached
cygcheck output), and your code snippet isn't self-contained, doesn't
compile (even discounting Yahoo's line wrapping -- next time, please
attach the code), and doesn't reproduce the bug.  In the absense of the
facts, I can only offer a WAG: does $CYGWIN contain "server" when you run
your program?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019