Article View: comp.mail.mh
Article #1904Re: inc loses mail when file system full (FIX)
From: Craig Leres
Date: Thu, 01 Jun 1989 05:18
Date: Thu, 01 Jun 1989 05:18
26 lines
1250 bytes
1250 bytes
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);
}
Technical Details
Message-ID:
<2750@helios.ee.lbl.gov>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!ace.ee.lbl.gov!leresReferences:
<1959@ccncsu.ColoState.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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