nspawn: fix exit code for --help and --version (#4609)

System Internals / systemd - Martin Pitt [ubuntu.com] - 7 November 2016 22:31 EST

Commit b006762 inverted the initial exit code which is relevant for --help and--version without a particular reason. For these special options, parse_argv() returns 0 so that our main() immediately skips to the end without adjusting "ret". Otherwise, if an actual container is being started, ret is set on error in run(), which still provides the "non-zero exit on error" behaviour.

Fixes #4605.

cfed63f nspawn: fix exit code for --help and --version (#4609)
src/nspawn/nspawn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Upstream: github.com


  • Share