Date: Sun, 26 Apr 2009 14:50:03 GMT From: Jilles Tjoelker <jilles@stack.nl> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/124748: [patch] sh(1): sh -c 'exit -1' fails with "Illegal number: -1", instead of exiting with a code of 255 Message-ID: <200904261450.n3QEo3w0020632@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/124748; it has been noted by GNATS. From: Jilles Tjoelker <jilles@stack.nl> To: bug-followup@FreeBSD.org, gcooper@FreeBSD.org Cc: Subject: Re: bin/124748: [patch] sh(1): sh -c 'exit -1' fails with "Illegal number: -1", instead of exiting with a code of 255 Date: Sun, 26 Apr 2009 16:40:46 +0200 Do people actually use 'exit -1' instead of the clearer 'exit 255'? '-1' is not an unsigned integer, so not a posix compliant parameter to the exit special builtin. Even then, sh still aborts a script with a nonzero exit code if exit is used wrongly like this. -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904261450.n3QEo3w0020632>