Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2005 10:51:07 -0700
From:      "Carl Delsey" <cdelsey@qwest.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Growisofs seg faults with DVD-RAM. Anybody else seen this?
Message-ID:  <20050730175107.GA59929@localhost.local>
In-Reply-To: <20050730062425.GK75379@wantadilla.lemis.com>
References:  <20050730055013.GA57362@localhost.local> <20050730062425.GK75379@wantadilla.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

<patch>
--- 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 */
</patch>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050730175107.GA59929>