Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mcvax!ace!konijn From: konijn@ace.UUCP Newsgroups: comp.bugs.4bsd Subject: inc(1) looses mail + fix Message-ID: <302@ace.UUCP> Date: Tue, 14-Apr-87 14:37:58 EST Article-I.D.: ace.302 Posted: Tue Apr 14 14:37:58 1987 Date-Received: Fri, 17-Apr-87 03:36:28 EST Sender: root@ace.UUCP Reply-To: konijn@ace.UUCP (Erik van Konijnenburg) Distribution: world Organization: ACE Associated Computer Experts bv, Amsterdam Lines: 48 Index: /usr/src/new/mh/uip/scansbr.c Description: The inc(1) command, part of MH-6.4, will loose mail if writing in a folder fails. This happens only for small messages. Repeat-By: For System V systems: sh $ date | mail me $ ulimit -f 0 $ inc incorporating new mail ... $ inc no mail to incorporate ... $ scan last 25 empty $ ^D Fix: Test return value of fclose(). *** /tmp/1 Tue Apr 14 20:27:45 1987 --- scansbr.c Tue Apr 14 20:16:01 1987 *************** *** 263,269 **** *--nxtbuf = tmpbuf; if (outnum) ! (void) fclose (scnout); return (state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG); } --- 263,270 ---- *--nxtbuf = tmpbuf; if (outnum) ! if (fclose (scnout) == EOF) ! adios (scnmsg, "Write error on"); return (state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG); } --------- Erik van Konijnenburg, , ...!mcvax!ace!konijn, ACE Associated Computer Experts bv, Amsterdam, the Netherlands