From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 19:50:05 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA3010657C6; Mon, 30 Mar 2009 19:50:05 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 579398FC1B; Mon, 30 Mar 2009 19:50:05 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DA23A1CEBB; Mon, 30 Mar 2009 21:50:03 +0200 (CEST) Date: Mon, 30 Mar 2009 21:50:03 +0200 From: Ed Schouten To: Tim Kientzle Message-ID: <20090330195003.GB73108@hoeg.nl> References: <93378.1238438607@critter.freebsd.dk> <49D115B9.7030501@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jE+K4o1MICf3EEet" Content-Disposition: inline In-Reply-To: <49D115B9.7030501@freebsd.org> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: FreeBSD Arch , Poul-Henning Kamp , Marcel Moolenaar Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 19:50:06 -0000 --jE+K4o1MICf3EEet Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tim Kientzle wrote: > POSIX does specify the range of allowable error codes > for a lot of system calls, but not all. In my experience, > straying outside of that causes more problems than it's > worth. A lot of programs make error-recovery decisions > based on errno values and that can get to be a portability > headache rather quickly (remember that for most software, > the default is going to be "if you don't recognize the errno > value, exit with a fatal error.") Create a new system call that allows you to obtain a more accurate error code afterwards. We should probably call this function GetLastError(). --=20 Ed Schouten WWW: http://80386.nl/ --jE+K4o1MICf3EEet Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAknRImsACgkQ52SDGA2eCwXBbwCcDz+uWpuDzx6Qq+MstzoBzPSF xKkAniV6c+8vAMkyGdHe3sekZRuKfmpU =AXqT -----END PGP SIGNATURE----- --jE+K4o1MICf3EEet--