From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6204 Path: news.gmane.org!not-for-mail From: u-wsnj@aetey.se Newsgroups: gmane.linux.lib.musl.general Subject: Re: fdopen/fflush problem Date: Fri, 26 Sep 2014 09:23:43 +0200 Message-ID: <20140926072343.GS20593@example.net> References: <54250245.2070108@i-soft.com.cn> <20140926061810.GQ23797@brightrain.aerifal.cx> <20140926063939.GF21835@port70.net> <20140926070548.GR23797@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1411716265 21880 80.91.229.3 (26 Sep 2014 07:24:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Sep 2014 07:24:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6217-gllmg-musl=m.gmane.org@lists.openwall.com Fri Sep 26 09:24:19 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XXPt4-00036p-BL for gllmg-musl@plane.gmane.org; Fri, 26 Sep 2014 09:24:18 +0200 Original-Received: (qmail 20427 invoked by uid 550); 26 Sep 2014 07:24:16 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 20419 invoked from network); 26 Sep 2014 07:24:16 -0000 X-T2-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50 Received-SPF: none receiver=mailfe03.swip.net; client-ip=195.154.226.66; envelope-from=u-wsnj@aetey.se Content-Disposition: inline In-Reply-To: <20140926070548.GR23797@brightrain.aerifal.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:6204 Archived-At: On Fri, Sep 26, 2014 at 03:05:48AM -0400, Rich Felker wrote: > unspecified if the flag argument contains more than the following > flags:" > > The list that follows includes just O_APPEND, O_CLOEXEC, and O_*SYNC, > so including O_WRONLY has unspecified behavior. However, since this is > just unspecified, not undefined, it seems bad for something "horribly > wrong" to happen, like a file with no access like we're getting now. > Indeed, POSIX will define an optional error: > > "The mkostemp( ) function may fail if: > > [EINVAL] The value of the flag argument is invalid." > > So I think we should either make this error be detected, or silently > mask off the bad access mode. My leaning would be towards reporting it > as an error. Opinions? +1 (reporting an error) Rune