Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!oliveb!pyramid!infmx!aland From: aland@infmx.UUCP (Dr. Scump) Newsgroups: comp.lang.c Subject: Bug in MS C unlink() ? Summary: should it be legal to unlink() an open file in MS C? Keywords: unlink MS clusters Turbo_I-Net Message-ID: <1032@infmx.UUCP> Date: 9 Mar 89 03:26:01 GMT Organization: Informix Software Inc., Menlo Park, CA. Lines: 26 I ran into a nasty problem with unlink() in Microsoft C's unlink() call (MS C 4.0 and 5.1). It seems that if one unlinks an *open* file on a hard disk, the result is lost clusters! the unlink() call itself returns 0. Question: is this legal? (key word here is LEGAL, I didn't say SMART) UNIX, of course, handles this just fine: the file disappears normally when it is no longer open in any process. The documentation does not state any restrictions on unlinking open files. (File was opened for writing with a regular fopen()). Known problem? Known limitation? DOS 3.3 bug? Did yesterday's solar eclipse have anything to do with it? (I did verify it in 4.0 and 5.1 and on 3 different machines). Thanks in advance, Alan Denney -- Alan S. Denney @ Informix Software, Inc. {pyramid|uunet}!infmx!aland "I want to live! -------------------------------------------- as an honest man, Disclaimer: These opinions are mine alone. to get all I deserve If I am caught or killed, the secretary and to give all I can." will disavow any knowledge of my actions. - S. Vega