From owner-freebsd-hackers Tue Mar 12 13:49: 0 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id E0D6B37B417 for ; Tue, 12 Mar 2002 13:48:51 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 9B3BFAE23A; Tue, 12 Mar 2002 13:48:51 -0800 (PST) Date: Tue, 12 Mar 2002 13:48:51 -0800 From: Alfred Perlstein To: Farooq Mela Cc: freebsd-hackers@freebsd.org Subject: Re: Recv() to a mmap'ed file? Message-ID: <20020312214851.GK92565@elvis.mu.org> References: <3C8E6CD5.67F23CF2@sm.socccd.cc.ca.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C8E6CD5.67F23CF2@sm.socccd.cc.ca.us> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Farooq Mela [020312 13:01] wrote: > > Rather than the usual recv() to a fixed size buffer, write() to the > file descriptor, loop, etc. However when I try to do this recv gives > me back an EFAULT (bad address). Is there a limitation of the > architecture which does not allows us to recv() to an mmap'ed area of > a file, or is it just something which hasn't been implemented? You may not extend a file using mmap(2), you must use ftuncate(2) or write(2). -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message