From owner-freebsd-questions@FreeBSD.ORG Sat Jul 30 17:51:14 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 091A416A41F for ; Sat, 30 Jul 2005 17:51:14 +0000 (GMT) (envelope-from cdelsey@qwest.net) Received: from mpls-qmqp-02.inet.qwest.net (mpls-qmqp-02.inet.qwest.net [63.231.195.113]) by mx1.FreeBSD.org (Postfix) with SMTP id E517C43D5F for ; Sat, 30 Jul 2005 17:51:08 +0000 (GMT) (envelope-from cdelsey@qwest.net) Received: (qmail 54829 invoked by uid 0); 30 Jul 2005 17:46:10 -0000 Received: from unknown (63.231.195.12) by mpls-qmqp-02.inet.qwest.net with QMQP; 30 Jul 2005 17:46:10 -0000 Received: from vdsl-130-13-181-49.phnx.qwest.net (HELO ?192.168.2.2?) (130.13.181.49) by mpls-pop-12.inet.qwest.net with SMTP; 30 Jul 2005 17:51:07 -0000 Received: by localhost.local (Postfix, from userid 1001) id 369914561; Sat, 30 Jul 2005 10:51:07 -0700 (MST) Date: Sat, 30 Jul 2005 10:51:07 -0700 Message-ID: <20050730175107.GA59929@localhost.local> From: "Carl Delsey" To: freebsd-questions@freebsd.org Mail-Followup-To: freebsd-questions@freebsd.org References: <20050730055013.GA57362@localhost.local> <20050730062425.GK75379@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050730062425.GK75379@wantadilla.lemis.com> User-Agent: Mutt/1.4.2.1i Subject: Re: Growisofs seg faults with DVD-RAM. Anybody else seen this? 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: Sat, 30 Jul 2005 17:51:14 -0000 On Sat, Jul 30, 2005 at 03:54:25PM +0930, Greg 'groggy' Lehey wrote: > On Friday, 29 July 2005 at 22:50:13 -0700, Carl Delsey wrote: > > I'm wondering if anybody else has seen this problem, and if you've > > found some other workaround for it? Or alternatively, you still have > > the problem and my patch would be useful to you. :-) > > Is this a workaround or a fix? The latter is obviously preferable. > Also, does this only affect FreeBSD, or is it general? In the former > case, contact the maintainer (mail address in the Makefile); in the > latter, contact the project. It's a fix ... just not as elegant as I would like. Looking through the code some more, it looks like it's a general problem. I'll try to get ahold of the maintainer and get this fixed in the distribution. In the meantime, if anybody needs a solution now, I'm including the patch here. --- growisofs.c Tue Aug 24 16:02:29 2004 +++ growisofs.c Sat Jul 30 10:35:45 2005 @@ -2043,7 +2044,9 @@ fcntl ((fd),F_SETFD,f|FD_CLOEXEC); } while (0) CLOSEONEXEC(in_fd); CLOSEONEXEC(out_fd); - CLOSEONEXEC(ioctl_fd); + if ((ioctl_handle) && (ioctl_handle != INVALID_HANDLE)) /*the fd might already have been closed*/ + { CLOSEONEXEC(ioctl_fd); + } #undef CLOSEONEXEC if (!dry_run && (poor_man || next_session==0)) /* unmount media */