jail exit code?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

jail exit code?

Michael W. Lucas-2
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.)

Thanks,
==ml

--
Michael W. Lucas https://mwl.io/
author of: Absolute OpenBSD, SSH Mastery, git commit murder,
Immortal Clay, PGP & GPG, Absolute FreeBSD, etc, etc, etc...
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: jail exit code?

James Gritton-2
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
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "[hidden email]"