From owner-freebsd-questions@FreeBSD.ORG Sun Dec 28 04:46:40 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30D64106564A for ; Sun, 28 Dec 2008 04:46:40 +0000 (UTC) (envelope-from mmitar@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by mx1.freebsd.org (Postfix) with ESMTP id DBF5E8FC13 for ; Sun, 28 Dec 2008 04:46:39 +0000 (UTC) (envelope-from mmitar@gmail.com) Received: by an-out-0708.google.com with SMTP id c2so1654226anc.13 for ; Sat, 27 Dec 2008 20:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=YaatuWISR0+yvWawgjHZ99pRRySFL0pYDjCudEjp5eY=; b=nMtMZHJiJnGdFs7nS+FVWOiqs91dL6fetwZasOBH0Sm4JIy/uNnAgd6ZFLBQrv5X2Q L/SfgZFq+VtrpJNpNQKeeq8OaM837taVnJTz8tyuRzD467A+euCJ9wNqOKtxkfbwyo6C yguKmsOiWV0S4gQ8X/LQCk87snHIo8U1xFTnQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=yFTgdbSaP+h6+B78GL5M1CiWtaidGD0FJyjztPQqeqPapyJ5SQN8fJ/9vvPqwp1gSP 9A1nDo8hg9QszkSDmQcm3EhyhaVPanY4h5+cdyRvdTrIk33DYTDcpMYrvxxYvifbVsbc LdcINTE5A8r1V5UPMC7A8A67xjcYHSGOx69+0= Received: by 10.100.140.20 with SMTP id n20mr7054194and.135.1230439599289; Sat, 27 Dec 2008 20:46:39 -0800 (PST) Received: by 10.100.6.8 with HTTP; Sat, 27 Dec 2008 20:46:39 -0800 (PST) Message-ID: Date: Sun, 28 Dec 2008 05:46:39 +0100 From: Mitar To: freebsd-questions@freebsd.org In-Reply-To: <200812271910.43793.fbsd.questions@rachie.is-a-geek.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812271517.46409.fbsd.questions@rachie.is-a-geek.net> <200812271910.43793.fbsd.questions@rachie.is-a-geek.net> Subject: Re: Open with O_APPEND fails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 04:46:40 -0000 Hi! On Sun, Dec 28, 2008 at 5:10 AM, Mel wrote: > 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. Where is documented that write would fail if file is opened only with O_APPEND? Just O_APPEND should also open file for writing as appending is also writing. It cannot be used without "write" semantics so file has to be open also for writing. Mitar