jail exit code?
James Gritton
jamie at freebsd.org
Wed Feb 6 17:43:50 UTC 2019
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
More information about the freebsd-jail
mailing list