delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/12/02/03:08:48

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: 02 Dec 2003 08:53:38 +0200
Message-Id: <un0abhfrh.fsf@elta.co.il>
From: Eli Zaretskii <eliz AT elta DOT co DOT il>
To: djgpp AT delorie DOT com
In-reply-to: <bqgoma$jle$1@au-nws-0001.flow.com.au> (bdeck@lycos.co.uk)
Subject: Re: DJGPP pipe troubles
References: <bqgoma$jle$1 AT au-nws-0001 DOT flow DOT com DOT au>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "bdeck" <bdeck AT lycos DOT co DOT uk>
> Newsgroups: comp.os.msdos.djgpp
> Date: Tue, 2 Dec 2003 12:17:56 +0100
> 
> I notice certian DJGPP executables create temporary files in $DJDIR/tmp like
> 'dj100000'. PythonD is one of them, in fact. These files get deleted
> automatically when the process ends. However, if the process that created
> the tempfile also spawned another process (via 'system' call), this tempfile
> does not get deleted until the external execuatable is also closed. The
> problem is that all DJGPP pipes ABORT until that process is closed, too, and
> the tempfile is deleted automatically by the system:

Sorry, you've lost me here: what do you mean by ``all DJGPP pipes
ABORT until that process is closed''?  How come _all_ DJGPP pipes
abort?

> What I
> don't understand is why the DOS program can't clean up its tempfile
> immediately. The fact that an external system call is still running in
> Windows environment should be irrelevant to DJGPP, or?

As long as the external program runs, the DJGPP program that invoked
it via `system' is suspended and cannot do anything.  Does that answer
your question, or did I misunderstand it?

> because the OS is also unable to remove this 'dj100000' file until
> the spawned process ends.

This happens because the temporary files are marked ``in use'': they
are open on some handle used by the running DJGPP program.  So the OS,
quite wisely, doesn't allow to remove them.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019