Date: Wed, 06 Feb 2019 10:15:11 -0700 From: James Gritton <jamie@freebsd.org> To: jail@freebsd.org Subject: Re: jail exit code? Message-ID: <c1515955d9cff9b0fffac5d634ab363c@freebsd.org> In-Reply-To: <20190206152759.GB47586@mail.michaelwlucas.com> References: <20190206152759.GB47586@mail.michaelwlucas.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-02-06 08:27, Michael W. Lucas wrote: > Hi, > > It *appears* from my reading of mailing list archives & forum posts > that the return code of a jail is the return code of the last jailed > process to exit. > > Is that the standard? Or is that just an accident, and people > shouldn't rely on it? > > (Either way, might be a nice addition to the man page.) Not quite, though there's some relationship. If jail(8) fails to start or stop a jail, it will return an error - just the typical 0 for success, 1 for fail. One reason for this failure may be one of the start or stop scripts returning an error code, in which case while you don't get the command's exit status you do get its general "errorness." But there are other reasons the jail may fail to start/stop, so you can't rely on the exit status to tell you the particulars. - Jamie
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c1515955d9cff9b0fffac5d634ab363c>