delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/11/01/03:44:24

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: cygwin stable and cvs snapshot - fork() bug
Date: Thu, 1 Nov 2007 09:43:04 +0100
Message-ID: <C0ED6A2866953E4487135B5DFCFF89A501C3792E@hmsx21.pnet.ch>
In-Reply-To: <4725D656.5090303@cygwin.com>
References: <C0ED6A2866953E4487135B5DFCFF89A501C04512 AT hmsx21 DOT pnet DOT ch> <4721DFCC DOT 8070100 AT cygwin DOT com> <C0ED6A2866953E4487135B5DFCFF89A501C048D6 AT hmsx21 DOT pnet DOT ch> <20071029083512 DOT GA4224 AT calimero DOT vinschen DOT de> <C0ED6A2866953E4487135B5DFCFF89A501C04A65 AT hmsx21 DOT pnet DOT ch> <4725D656 DOT 5090303 AT cygwin DOT com>
From: <michael DOT vogt AT post DOT ch>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id lA18iCp7018975

> If you want anything like this to be looked at faster, the best thing
> you can do is http://www.cygwin.com/acronyms/#PPAST. Apparently the
> cygwin developers have not so far been interested to download mpd,
> make unspecified changes to the mpd sources to get them to compile
> (the changes you listed on the bug report were not sufficient), and
> then setup the configuration files for mpd, figure out what mpd is
> supposed to do, and THEN debug the problem.
...
> Lev

hey, thanks for your reply

ok i tried to create a STC, but i'm don't really know ipc and shared
mem.. anyway i traced down the part, which cause trouble

(init code, called before the fork occours)
if ((shmid = shmget(IPC_PRIVATE, allocationSize, IPC_CREAT | 0777)) < 0)
FATAL("problems shmget'ing\n");
//if ((shmid = shmget(IPC_PRIVATE, allocationSize, IPC_CREAT | 0600)) <
0)	FATAL("problems shmget'ing\n");
if (!(playerData_pd = shmat(shmid, NULL, 0))) FATAL("problems
shmat'ing\n");
if (shmctl(shmid, IPC_RMID, NULL) < 0) 	FATAL("problems shmctl'ing\n");

when i comment out 
  if (shmctl(shmid, IPC_RMID, NULL) < 0) 	FATAL("problems
shmctl'ing\n");

mpd works like a charm. 

       IPC_RMID    is  used  to mark the segment as destroyed. It
                   will actually  be  destroyed  after  the  last
                   detach.   (I.e., when the shm_nattch member of
                   the associated structure  shmid_ds  is  zero.)
                   The  user  must  be the owner, creator, or the
                   super-user.

can someone explain me, what i just did? I also tried to change the
shmget rights from 0600 to 0777.

thanks in advance
michu

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