Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!munnari.oz.au!brolga!uqcspe!cs.uq.oz.au!rhys From: rhys@cs.uq.oz.au (Rhys Weatherley) Newsgroups: comp.windows.ms Subject: Warning about terminating DOS windows Message-ID: <1319@uqcspe.cs.uq.oz.au> Date: 12 May 91 23:35:14 GMT Sender: news@cs.uq.oz.au Reply-To: rhys@cs.uq.oz.au Lines: 44 Hi all! This is a little warning about what can happen to your hard drive if you terminate DOS applications using Windows 3.0 "Settings/Terminate" (sometimes you REALLY need to do this, especially when writing programs). I've found this out the hard way. If your DOS program has been writing output to a file (especially when it's creating a new file), then every block is marked as "unmoveable" while the file is being created, and the directory is not updated until the file is closed. This is pretty standard practice where two or more applications may happen to access the same file (not that I like this practice though). When you terminate the application the blocks are still left as unmoveable and the directory is not updated to point to the blocks - it usually reports a file length of 0. Such unmoveable blocks can begin to clutter up your hard drive quite quickly if you have to terminate programs often because of unforeseen crashes. I came across this last night when I redirected standard output of a program that I wrote to a file (since it was generating LOTS of output). I wasn't checking "disk full" or anything (and let's face it, who does with "printf"!) so the hard drive stopped spinning at one stage (when the partition was full) and I decided it was time to stop it - the only way was either to reboot or use "Terminate", and I prefer to terminate. When I got everything back to normal, I found that my partition was practically full (it had 11 Meg free before I ran the program), but the output file was of length 0. Using Norton's SD program to look at the block structure of the disk, I found nearly everything marked as unmoveable. Oh well, after a backup and reformat of the partition, everything is back to normal. So if you appear to be losing space on your hard drive when using Windows 3.0, this may be one of the reasons. I wouldn't be suprised if DOS does this on its own as well - if you reboot, DOS may leave some unmoveable blocks around - it may not even be a Windows 3.0 problem, but shows up more under it because you can terminate applications. Rhys. +=====================+==================================+ || Rhys Weatherley | The University of Queensland, || || rhys@cs.uq.oz.au | Australia. G'day!! || || "I'm a FAQ nut - what's your problem?" || +=====================+==================================+