Mail Archives: djgpp-workers/1999/04/14/15:17:16
DJ Delorie <dj AT delorie DOT com> wrote:
> > Should djgpp behave like this. I mean: unlink checks in the list of opened
> > files, if the file is open it just sets a flag (not call) and then in close
> > check this flag and if needed remove the file... hmmm can be implemented,
> > don't know if that's really needed.
>
> There's already a function to do this. We note the filename in the
> FILE* struct and remove the file upon close. We don't support it in
> the general case, but we do have the standard function for making
> temporary files.
What about extending it for regular files. It will work under Win9x even if
the father needs to access the file (is the one that opened) because the
child can't remove the file. If more than one program opens the same file,
the last that makes the close/remove will remove the file. The others will
fail to remove the file. In DOS there is no solution, but the real problem is
Win3.1 because DOS isn't multitask and I think the real problem is with more
than one task.
To do it we must do a search in the list of opened files, what do you think?
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://welcome.to/SetSoft
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(5411) 4759 0013
- Raw text -