From owner-freebsd-current Fri May 29 13:19:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA29199 for freebsd-current-outgoing; Fri, 29 May 1998 13:19:50 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA29186 for ; Fri, 29 May 1998 13:19:43 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.8.8/8.8.5) with ESMTP id MAA00482; Fri, 29 May 1998 12:13:13 -0700 (PDT) Message-Id: <199805291913.MAA00482@dingo.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Peter Dufault cc: bde@zeta.org.au (Bruce Evans), mike@smith.net.au, current@FreeBSD.ORG Subject: Re: cdrecord trouble on currnet In-reply-to: Your message of "Fri, 29 May 1998 07:09:30 EDT." <199805291109.HAA23356@hda.hda.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 29 May 1998 12:13:12 -0700 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) { > > > if (errno != 0) { > > > /* This isn't valid: > > > */ > > (...) > > > The "This isn't valid" case isn't valid, since sysconf() doesn't change > > errno if there is no error. errno must be set before calling sysconf(). > > I needed to cut a few more lines: > > > /* Is priority scheduling configured? > > */ > > errno = 0; > > if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) { > > Remember: Bruce is watching. Measure twice, cut once. 8) Thanks again. In reality, I can just check the return from sysconf; if _SC_PRIORITY_SCHEDULING can't be queried, then it's not a goer anyway. -- \\ 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