Date: Sat, 27 Dec 2008 19:10:43 -0900 From: Mel <fbsd.questions@rachie.is-a-geek.net> To: freebsd-questions@freebsd.org Cc: Mitar <mmitar@gmail.com> Subject: Re: Open with O_APPEND fails Message-ID: <200812271910.43793.fbsd.questions@rachie.is-a-geek.net> In-Reply-To: <f63c4b2d0812271916l180c6c9bt9678cebc8f808587@mail.gmail.com> References: <f63c4b2d0812271246u18a881e6j87e0054c24f4661a@mail.gmail.com> <200812271517.46409.fbsd.questions@rachie.is-a-geek.net> <f63c4b2d0812271916l180c6c9bt9678cebc8f808587@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 27 December 2008 18:16:41 Mitar wrote: > Hi! > > On Sun, Dec 28, 2008 at 1:17 AM, Mel > > <fbsd.questions@rachie.is-a-geek.net> wrote: > > 15 fd = open(fname, O_WRONLY|O_APPEND); > > Try only with O_APPEND, without O_WRONLY. Why would you? open(2) will succeed but write(2) will fail with EBADF as documented (and I verified this behavior). Still no EACCES as you and the bugreporter are seeing. If this is really a bug in FreeBSD I'd expect way more applications to suffer issues. There must be something else at play and I certainly don't have an explanation why specifying the O_WRONLY flag would cause this bug to disappear. I suspect priv(9) to be responsible for the change in behavior you're seeing, however that should return EPERM not EACCES. -- Mel Problem with today's modular software: they start with the modules and never get to the software part.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812271910.43793.fbsd.questions>