From owner-freebsd-hackers Sat Oct 16 23:31:27 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id C9F5914C8E for ; Sat, 16 Oct 1999 23:31:24 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from [204.68.178.39] (helo=softweyr.com) by mail.xmission.com with esmtp (Exim 2.12 #2) id 11cjql-000538-00; Sun, 17 Oct 1999 00:31:23 -0600 Message-ID: <38096D39.794E9EC0@softweyr.com> Date: Sun, 17 Oct 1999 00:31:21 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.1-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Kevin Day Cc: Mark Newton , Dodge Ram , freebsd-hackers@FreeBSD.ORG Subject: Re: Handling segV's References: <199910170524.AAA26797@celery.dragondata.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Kevin Day wrote: > > > > > Kevin Day wrote: > > > > > > I mmap() files in, then copy them to a device. This works great except when > > > someone tries to change that file during the copy. If the size of the file > > > shrinks, I'll SIGBUS or SIGSEGV when i try to touch past the new file size. > > > So, i setup a signal handler and longjmp into some recovery code. > > > > > > Perhaps there's a better way, but I don't consider this a bug really, and > > > i'll get a SEGV. :) > > > > MAP_PRIVATE? > > > > This has the undesired effect of me not noticing that the file changed then. stat(2) it after the copy? OK, I'm reaching. Handling SEGV seems like a rather iffy solution at best. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message