Growisofs seg faults with DVD-RAM. Anybody else seen this?

Carl Delsey cdelsey at qwest.net
Sat Jul 30 17:51:14 GMT 2005


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>


More information about the freebsd-questions mailing list