Date: Mon, 01 Jun 1998 08:13:18 -0700 From: Mike Smith <mike@smith.net.au> To: Joerg Schilling <schilling@fokus.gmd.de> Cc: mike@smith.net.au, freebsd-current@FreeBSD.ORG Subject: Re: cdrecord trouble on currnet Message-ID: <199806011513.IAA17888@antipodes.cdrom.com> In-Reply-To: Your message of "Mon, 01 Jun 1998 14:15:43 %2B0200." <199806011215.OAA16994@sherwood.gmd.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> >From mike@dingo.cdrom.com Fri May 29 22:41:20 1998 > > >It's due to not checking the return value from the sysconf(_SC_PAGESIZE) > >in fifo.c. Once you get past that, there's a timing failure between the > >writer and reader processes due to a similar omission a little further > >down the file. > > >Having dealt with these, I seem to be dummy-burning quite happily. = > >I'll cut a disc for real to be sure, and then send you my patches for = > >discussion. > > This seems to be the real problem with freebsd-current. There do not seem to be any other operational problems, no. The weekend intervened before I could complete checking against your error handling suggestions; I'll finish that this morning. > You cannot deal with this problem: > > Systems that define _SC_PAGESIZE or _SC_PAGE_SIZE (HP-UX) > don't support getpagesize() so there is no way to fix this > in runtime except if you introduce an additional > > HAVE_GETPAGESIZE > > in the autoconfiguration. > > But even then the code would be badly readable. This is a problem with the design of cdrecord, insofar as it's fairly clear it wasn't designed for portability. Probably the most expedient move would be not to pretend that cdrecord is compliant with the default POSIX API on FreeBSD for now, and wind back the presented API to one that it is. That's what _POSIX_VERSION is all about. Thanks for the HP-UX pointer; I'll take note that _SC_PAGESIZE is implicitly assumed to mean DONT_HAVE_GETPAGESIZE. > I would prefer if the sysconf code would call getpagesize() in userland. This would defeat the entire purpose of sysconf(), which is to pass opaque constants to the kernel. I don't see any merit in hacking a perfectly compliant interface to deal with (pardon my saying it) buggy applications. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806011513.IAA17888>