Date: Mon, 19 Feb 2001 22:12:07 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Tim Van Holder" Message-Id: <3405-Mon19Feb2001221207+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp-workers AT delorie DOT com In-reply-to: Subject: Re: O_TEMPORARY and unlink() References: Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Tim Van Holder" > 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.