Mail Archives: djgpp/2003/12/02/03:08:48
> 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 -