Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!ace.ee.lbl.gov!leres From: leres@ace.ee.lbl.gov (Craig Leres) Newsgroups: comp.mail.mh Subject: Re: inc loses mail when file system full (FIX) Message-ID: <2750@helios.ee.lbl.gov> Date: 1 Jun 89 05:18:17 GMT References: <1959@ccncsu.ColoState.EDU> Sender: usenet@helios.ee.lbl.gov Reply-To: leres@helios.ee.lbl.gov (Craig Leres) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 26 Humm... Steve Dempsey's fix to inc seems overly complex. My fix for 6.5's inc (which should work with the 6.6 version) is to check the status of ferror() and fclose(); appended is a context diff. Craig ------ diff -c -r1.1 inc.c *** /tmp/,RCSt1a01830 Wed May 31 22:00:18 1989 --- inc.c Wed May 31 21:49:13 1989 *************** *** 580,586 **** (void) map_write (file, pd, 0, start, stop, pos, size, noisy); } else { ! (void) fclose (pf); free (cp); } --- 580,587 ---- (void) map_write (file, pd, 0, start, stop, pos, size, noisy); } else { ! if (ferror(pf) || fclose (pf)) ! adios (file, "write error on"); free (cp); }