From owner-freebsd-hackers Tue Mar 12 23:19: 6 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from scaup.prod.itd.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by hub.freebsd.org (Postfix) with ESMTP id C10A137B400 for ; Tue, 12 Mar 2002 23:19:02 -0800 (PST) Received: from pool0172.cvx22-bradley.dialup.earthlink.net ([209.179.198.172] helo=mindspring.com) by scaup.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16l32K-0001RH-00; Tue, 12 Mar 2002 23:19:01 -0800 Message-ID: <3C8EFD53.46D7EB1B@mindspring.com> Date: Tue, 12 Mar 2002 23:18:43 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: Farooq Mela , freebsd-hackers@freebsd.org Subject: Re: Recv() to a mmap'ed file? References: <3C8E6CD5.67F23CF2@sm.socccd.cc.ca.us> <20020312214851.GK92565@elvis.mu.org> <3C8EEA50.C3E17315@sm.socccd.cc.ca.us> <20020313060553.GF32410@elvis.mu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Alfred Perlstein wrote: > > The file is already the required size. > > Gah... oops :) > > Have you tried the mapping with PROT_READ as well? I don't think > most arches allow for access without PROT_READ along with PROT_WRITE. Being the required size doesn't necessarily mean that it had indirect blocks allocated to the NUL filled region. He'd be much better off trying this with a file he created using "dd if=/dev/zero bsize=??? count=??? of=my_file" than something truncated to the expected size. Actually, he's be better still if he'd implement a "recvfile" to be the opposite end of a "sendfile". 8-). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message