delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/10/13:18:05

X-Spam-Check-By: sourceware.org
Date: Tue, 10 Jan 2006 12:18:21 -0600
From: Brian Ford <Brian DOT Ford AT flightsafety DOT com>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: vfork alternatives?
In-Reply-To: <43C3E833.8A6E1346@dessent.net>
Message-ID: <Pine.CYG.4.58.0601101205290.1280@PC1163-8460-XP.flightsafety.com>
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0601101036490 DOT 1280 AT PC1163-8460-XP DOT flightsafety DOT com> <43C3E833 DOT 8A6E1346 AT dessent DOT net>
MIME-Version: 1.0
X-IsSubscribed: yes
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 Tue, 10 Jan 2006, Brian Dessent wrote:
> Brian Ford wrote:
> > We have an application that mmaps a *huge* MAP_PRIVATE|MAP_ANON virtual
> > address scratch space.  It also needs to occasionally fork/exec a sub
> > process.  Unfortunately, the time and virtual memory required for Cygwin
> > to copy this region to the forked child just so it can throw it away and
> > do an exec is prohibitive if it's even possible.
>
> How about the the spawn*() family of functions?

Good suggestion.  I had forgotten of their existence.  However, I have a
few questions about their semantics if anyone knows.

The process in question has a realtime priority.  It would like to
spawn a sub process with normal priority.  If it were forking, it'd set
this in the child before the exec.  I'm not sure what to do about it when
spawning?

I also normally restore ignored signals to default handlers and
clear the signal mask of the child to remove any inheritance.
Does anyone know the semantics of spawned processes with respect to
signals?  It would seem that my desired behavior should be default, but I
have my doubts that it actually is.

Any pointer to spawn documentation would also be appreciated.  I'll read
the code if necessary, but spawn_guts is a bit messy ;-).

Thanks again for the suggestions.

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...


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