delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/06/03:54:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Tue, 6 Aug 2002 09:53:49 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: _exit() missing WSACleanup() call?
Message-ID: <20020806095349.N3921@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1028578338 DOT 7433 DOT ezmlm AT cygwin DOT com> <200208060544 DOT 29738 DOT pullmoll AT stop1984 DOT com>
Mime-Version: 1.0
In-Reply-To: <200208060544.29738.pullmoll@stop1984.com>
User-Agent: Mutt/1.3.22.1i

On Tue, Aug 06, 2002 at 05:44:20AM +0200, Juergen Buchmueller wrote:
> It actually seems to be the mmap() implementation which is giving me troubles. 
> [...]
> Now the first mmap() region seems to work fine and how I expected -- just as 
> it works under *nix, too. The 'sibling' child processes can write to each 
> other's memory. However, as soon as any child writes to the second anon + 
> shared mmap() region, the Windows memory usage goes up by an amount which 
> (exactly!?) matches the size of that region -- BTW: this is something like 
> 600KB.
> [...]
> Is there a hidden hierarchy in CYGWIN's mmap() implementation? Or with other 
> words, is writing to an anon + shared mmap()ed region from a sibling process 
> that is not a direct descendant of the parent that created a memory map, but 
> rather a child of another process created by a uber-parent which already 
> exited, something that should work?

In theory, it should.  In theory.

Could you run `strace -f' and look if there's

> I must admit that I am confused by my own code right now and even more by the 
> mmap.cc code and comments. I'm not an experienced multi process + daemon 
> author either. For now I sticked up, because crashing OSes make me sick ;-)

Please, could you try to create a simple testcase which exhibits that
behaviour?  Oh and, could you please tell which OS you're using?

I'm really trying hard to get a mmap() implementation which is as U*X
like as possible.  A simple testcase could help a lot.

> [2] I guess you know the fork2() stuff. It is described at e.g. 
> http://www.erlenstar.demon.co.uk/unix/faq_toc.html#TOC88

No, I didn't know that stuff.  Did you try to change your implementation
so that you use fork() and really wait() for the children?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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