Path: utzoo!attcan!uunet!husc6!rutgers!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: news.admin Subject: Re: Empty News Articles Summary: full filesystem error check Message-ID: <4851@bsu-cs.UUCP> Date: 22 Nov 88 17:55:30 GMT References: <341@igor.Rational.COM> <53200002@uicsrd.csrd.uiuc.edu> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 17 In article <53200002@uicsrd.csrd.uiuc.edu> mcdaniel@uicsrd.csrd.uiuc.edu writes: >I know that "write" often returns immediately (using write-behind), so >there's no guarantee of an error code being returned. Isn't there >some other way for news/notes to check for a full filesystem? A common bug in C programs is to fail to detect a full device. The write system call is guaranteed to return an error code if the device is full or will become full when the kernel flushes its internal buffer(s) for that open file. But programmers using stdio are not always careful to check return values form ALL functions/macros that could possibly cause an error. These include: printf, putc/putchar, fflush, and fclose. -- Rahul Dhesi UUCP: !{iuvax,pur-ee}!bsu-cs!dhesi