This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: vfork alternatives?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]