diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2015-11-05 13:44:12 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2015-11-05 13:44:12 +0100 |
commit | 35607a8d1c843d352f61b6108a147e84fc6a8b00 (patch) | |
tree | 32ffd765951fee26a6b6a81ac42d286a72ae6556 /src/nspawn | |
parent | 070edd97f397c90015c9ecad33ab9bf50d84ceb4 (diff) |
nspawn: save errno before reopening log after exec failure
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 699a013a9c..0a8ea84ea6 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -2585,8 +2585,9 @@ static int inner_child( execle("/bin/sh", "-sh", NULL, env_use); } + r = -errno; (void) log_open(); - return log_error_errno(errno, "execv() failed: %m"); + return log_error_errno(r, "execv() failed: %m"); } static int outer_child( |