X-Spam-Check-By: sourceware.org Date: Tue, 10 Jan 2006 12:18:21 -0600 From: Brian Ford 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: References: <43C3E833 DOT 8A6E1346 AT dessent DOT net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/