summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:12 +0100
committerMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:12 +0100
commit35607a8d1c843d352f61b6108a147e84fc6a8b00 (patch)
tree32ffd765951fee26a6b6a81ac42d286a72ae6556 /src/nspawn/nspawn.c
parent070edd97f397c90015c9ecad33ab9bf50d84ceb4 (diff)
nspawn: save errno before reopening log after exec failure
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c3
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(