From owner-freebsd-questions Mon Jan 15 10: 8:27 2001 Delivered-To: freebsd-questions@freebsd.org Received: from be-well.ilk.org (lowellg.ne.mediaone.net [24.147.184.128]) by hub.freebsd.org (Postfix) with ESMTP id AF6C337B400 for ; Mon, 15 Jan 2001 10:08:08 -0800 (PST) Received: (from lowell@localhost) by be-well.ilk.org (8.11.1/8.11.1) id f0FI82j04162; Mon, 15 Jan 2001 13:08:02 -0500 (EST) (envelope-from lowell) To: freebsd-questions@freebsd.org Subject: Re: date command and it's return code.. References: <001301c07e71$d8cb9a00$0304a8c0@smalweer.nl> From: Lowell Gilbert Date: 15 Jan 2001 13:08:02 -0500 In-Reply-To: ron@zappa.demon.nl's message of "14 Jan 2001 22:37:24 +0100" Message-ID: <44zogshenx.fsf@lowellg.ne.mediaone.net> Lines: 16 X-Mailer: Gnus v5.7/Emacs 20.7 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ron@zappa.demon.nl (Ron Klinkien) writes: > Why is the /bin/date command returning such weird return codes? > > It returns 512 on an succesfull time change, and 256 when > started with wrong arguments.. I don't think the return value is *ever* set, except in a few odd network-related cases. That means return values are essentially random. A good start might be initializing the return value to zero, but more error-handling code is really needed. I may be missing something here, because as far as I can see, this problem has existed since before our CVS tree records. - Lowell To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message