From owner-freebsd-current Thu May 28 18:20:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA14111 for freebsd-current-outgoing; Thu, 28 May 1998 18:20:11 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA14098 for ; Thu, 28 May 1998 18:20:04 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id LAA20313; Fri, 29 May 1998 11:19:43 +1000 Date: Fri, 29 May 1998 11:19:43 +1000 From: Bruce Evans Message-Id: <199805290119.LAA20313@godzilla.zeta.org.au> To: dufault@hda.com, mike@smith.net.au Subject: Re: cdrecord trouble on currnet Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> Can you give an example of the correct mechanism for using sysconf() to >> determine the availability of the scheduler? I'll fix it in the >> updates I'm working on. > > if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) { > if (errno != 0) { > /* This isn't valid: > */ > err(EX_OSERR, "sysconf(_SC_PRIORITY_SCHEDULING)"); > } > else { > errx(EX_UNAVAILABLE, > "No run-time support for POSIX priority scheduling"); > } > } 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(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message