Mail Archives: djgpp-workers/2001/02/19/15:13:55
> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Mon, 19 Feb 2001 18:33:03 +0100
>
> The `unlink' function deletes the file name FILENAME. If this is
> a file's sole name, the file itself is also deleted. (Actually,
> if any process has the file open when this happens, deletion is
> postponed until all processes have closed the file.)
>
> Seems to me that this fits in nicely with the O_TEMPORARY support
We discussed a possibility of supporting this, but it has too many
problems. For example, if a child program unlinks a file which is
open by in the parent.
On Unix, this magic is on the OS, so it works there.
You can find the discussion in the archives of djgpp-workers.
> (although well-behaved programs will usually close a file before
> unlinking it).
If you unlink an open file on DOS, you run a real risk of corrupting
the FAT. On Windows 9X it simply fails, while NT (and probably W2K as
well) work like Unix.
- Raw text -