Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Date: Wed, 19 Jan 2000 11:01:55 -0500
From: Chris Faylor <cygwin@sourceware.cygnus.com>
To: Jason Moxham <jlm@maths.soton.ac.uk>
Cc: cygwin@sourceware.cygnus.com
Subject: Re: bug in execl
Message-ID: <20000119110155.B4922@cygnus.com>
Reply-To: cygwin@sourceware.cygnus.com
Mail-Followup-To: Jason Moxham <jlm@maths.soton.ac.uk>,
	cygwin@sourceware.cygnus.com
References: <200001191222.MAA06611@malus.soton.ac.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0i
In-Reply-To: <200001191222.MAA06611@malus.soton.ac.uk>; from jlm@maths.soton.ac.uk on Wed, Jan 19, 2000 at 12:22:13PM +0000

On Wed, Jan 19, 2000 at 12:22:13PM +0000, Jason Moxham wrote:
> 
> 
> Bug in execl()
> ---------------
> 
> Under B20.1+gcc-2.95.2 running on NT/98 under a "dos" window (not bash)
> 
> prog1.exe consists of
> 
> {signal(SIGHUP,SIG_IGN);
> //some stuff
> execl("prog2.exe","prog2.exe",argv[1],argv[2],argv[3],0);
> return 0;}
> 
> prog2.exe consists of
> 
> {signal(SIGHUP,SIG_IGN);
> // stuff
> return 0;}
> 
> I pretty sure the details of the program don't matter
> 
> No problem running it , however using task manager on NT we see that 
> when prog2.exe is running , prog1.exe is still there when it should be
> overwriten .
> 
> So a series of execl calls could easily fill up all memory , when the
> only memory required is for the program currently executing

Sorry.  That's the best we can do when emulating exec on Windows.

If you run this under bash or sh you should note that this behavior does
not occur.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

