From owner-freebsd-stable Sun Oct 28 14:14:34 2001 Delivered-To: freebsd-stable@freebsd.org Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by hub.freebsd.org (Postfix) with ESMTP id 5C84637B406 for ; Sun, 28 Oct 2001 14:14:29 -0800 (PST) Received: (from olli@localhost) by lurza.secnetix.de (8.11.6/8.11.6) id f9SMESs99232; Sun, 28 Oct 2001 23:14:28 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Date: Sun, 28 Oct 2001 23:14:28 +0100 (CET) Message-Id: <200110282214.f9SMESs99232@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG Reply-To: freebsd-stable@FreeBSD.ORG Subject: Re: pathname length over NFS In-Reply-To: <4.2.2.20011028145225.00a64470@mailhost.dcfinc.com> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.4-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Chad R. Larson wrote: > Why is there an overlap > between the recommended codes in sysexits(3) and "/usr/include/errno.h"? They serve different purposes, and are used for different things, so there shouldn't be a conflict. The errno values are used as return values from syscalls and library functions. They are _not_ used for program exit codes. Unfortunately, some programs print numerical errno values because they're too stupid (or too lazy) to use perror() or strerror() or some similar way to display a readable error string. Normally, the user should not need to care about errno numbers at all. They are for programmers. The sysexits(3) values were originally intended as a way to communicate between programs: When sendmail calls an external program (e.g. mail_local or procmail), it checks the exit code to find out if everything is alright, or if a transient problem occured, or if something went out of resources, or if a fatal error occured. Depending on that, sendmail deletes the mail, or spools it locally for another delivery attempt at a later time, or bounces it back with an appropriate error message. Other, non mail-related tools use sysexits(3) values, too, to further classify the result beyond the traditional 0/ok and 1/failure, so that scripts and other programs have a better chance to do sensible things when something went wrong. This is a good thing, IMO. Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "All that we see or seem is just a dream within a dream" (E. A. Poe) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message