From owner-freebsd-hackers Wed Oct 15 08:55:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA26518 for hackers-outgoing; Wed, 15 Oct 1997 08:55:29 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from zwei.siemens.at (zwei.siemens.at [193.81.246.12]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA26497 for ; Wed, 15 Oct 1997 08:55:18 -0700 (PDT) (envelope-from lada@ws6303.gud.siemens.at) Received: from ws6303-f (root@firix [10.1.143.100]) by zwei.siemens.at with ESMTP id RAA23707; Wed, 15 Oct 1997 17:54:33 +0200 (MET DST) Received: from ws6423.gud.siemens.at (ws6423-f) by ws6303-f with ESMTP (1.40.112.8/16.2) id AA211240838; Wed, 15 Oct 1997 17:53:58 +0200 Received: by ws6423.gud.siemens.at (SMI-8.6/SMI-SVR4) id RAA27333; Wed, 15 Oct 1997 17:52:41 +0200 Date: Wed, 15 Oct 1997 17:52:41 +0200 From: lada@ws6303.gud.siemens.at (marino.ladavac@siemens.at) Message-Id: <199710151552.RAA27333@ws6423.gud.siemens.at> To: hackers@FreeBSD.ORG, jacques@wired.ctech.ac.za Subject: Re: values for exit() Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Md5: MIzgaKQF7j+8p9lgfwsHqA== Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 15 17:45:21 MET 1997 > Date: Wed, 15 Oct 1997 16:58:58 +0200 > From: Jacques Hugo > Mime-Version: 1.0 > To: questions@FreeBSD.ORG > Subject: values for exit() > Content-Transfer-Encoding: 7bit > X-Loop: FreeBSD.org > > Hi there ... > > Where can I find the exit values for > exit()? Meaning, what is the difference > between eg exit(1) and exit(2)? Taken from hackers. The lowest 8 bits of the exit argument can be picked up with wait(2). exit(0) is defined as successful termination and treated as such by the invoking shell. All other exit(2) values are signals of failure and should be treated as such by the invoking programs (the shells do it already.) Please beware that exit(256) is the same as exit(0)! You can use it for the programs that are usually invoked from some other programs of yours in order to send some post-mortem signal to its invoker i.e. where did it die, and why. /Marino > > Thanks > -Jacques > > ----------------------------------------------------- > The box said "Requires Windows 3.1 or better" > ... so I got BSD > > System Administrator | Jacques Hugo > UNIX Systems | jacques@wired.ctech.ac.za > Cape Technikon | +27-21-4603584 > ------------------------------------------------------ >