From owner-freebsd-current@FreeBSD.ORG Thu Apr 15 05:29:01 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABEE916A4CE for ; Thu, 15 Apr 2004 05:29:01 -0700 (PDT) Received: from tx2.oucs.ox.ac.uk (tx2.oucs.ox.ac.uk [163.1.2.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F12443D4C for ; Thu, 15 Apr 2004 05:29:01 -0700 (PDT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan2.oucs.ox.ac.uk ([163.1.2.162] helo=localhost) by tx2.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1BE5zI-00084o-K2 for freebsd-current@freebsd.org; Thu, 15 Apr 2004 13:29:00 +0100 Received: from rx2.oucs.ox.ac.uk ([163.1.2.161]) by localhost (scan2.oucs.ox.ac.uk [163.1.2.162]) (amavisd-new, port 25) with ESMTP id 31015-01 for ; Thu, 15 Apr 2004 13:29:00 +0100 (BST) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx2.oucs.ox.ac.uk with smtp (Exim 4.24) id 1BE5zH-00084Q-9Z for freebsd-current@freebsd.org; Thu, 15 Apr 2004 13:28:59 +0100 Received: (qmail 12272 invoked by uid 1004); 15 Apr 2004 12:28:59 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.20 (clamscan: 0.67. sweep: 2.18/3.79. Clear:RC:1(163.1.161.131):. Processed in 0.34529 secs); 15 Apr 2004 12:28:59 -0000 Received: from dhcp1131.wadham.ox.ac.uk (HELO piii600.wadham.ox.ac.uk) (163.1.161.131) by gateway.wadham.ox.ac.uk with SMTP; 15 Apr 2004 12:28:59 -0000 Message-Id: <6.0.1.1.1.20040415132124.03c7c248@imap.sfu.ca> X-Sender: cperciva@imap.sfu.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Thu, 15 Apr 2004 13:28:57 +0100 To: freebsd-current@freebsd.org From: Colin Percival Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Behaviour of fflush() on a file opened for reading X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2004 12:29:01 -0000 PR kern/65402 complains about fflush() failing if called on a file opened read-only. Our libc returns an error; many do not. According to the ISO C standard, behaviour here is undefined. Should we change our behaviour to meet the expectations of broken programs? In order to avoid creating lots of noise on the list, please reply to me directly. Colin Percival