Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rutgers!sunybcs!cald80!bob
From: bob@cald80.UUCP (bob)
Newsgroups: comp.sys.ibm.pc
Subject: Re: Recovering file that DIR says is 0 bytes.
Message-ID: <1229@cald80.UUCP>
Date: Sat, 25-Jul-87 18:25:04 EDT
Article-I.D.: cald80.1229
Posted: Sat Jul 25 18:25:04 1987
Date-Received: Sun, 26-Jul-87 04:47:03 EDT
References: <4142@vrdxhq.UUCP> <1801@nicmad.UUCP>
Reply-To: bob@cald80.UUCP (bob)
Distribution: na
Organization: Calspan Advanced Technology Center
Lines: 21
Keywords: FAT, file closing
Summary: Mebbe the thing didn't actually write anything


	I met this problem with another program I was working on a
while back.  What I found out was the program was opening the file for
writing and then just buffering all of the data until it finished and
then wrote it all out.

	This is necessitated in communications programs 'cuz as I
recall, a disk interrupt is a higher priority than an rs232 interrupt
and if all of the data doesn't get out or you take a soft error, you
start losing bytes on the com line (the silly sucker don't got no
buffering).

	The key here is DON'T turn off the computer while inside of a
program.  This is bad medicine in any world or universe.

---
   Thinking quickly, the IBM System Jock     # Bob Meyer
uttered an incantation in EBCDIC and made    # Calspan Advanced Tech. Center
the sign of the Terminated Fork.             # seismo!kitty!sunybcs!cald80!bob
   The UNIX Guru only smiled and trapped     # decvax!sunybcs!cald80!bob
him in a recursive SED script.