chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bc6aed7
)
nspawn: fix reboot event fd reuse
author
Lennart Poettering
<lennart@poettering.net>
Wed, 29 Jan 2014 19:58:50 +0000
(20:58 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 29 Jan 2014 19:58:50 +0000
(20:58 +0100)
src/nspawn/nspawn.c
patch
|
blob
|
history
diff --git
a/src/nspawn/nspawn.c
b/src/nspawn/nspawn.c
index 38ec89b9a69f9e1f6d646d3376922f3b28d78a9d..5352b95ec69776b20c103ac6a1a4736dfe870fa8 100644
(file)
--- a/
src/nspawn/nspawn.c
+++ b/
src/nspawn/nspawn.c
@@
-1206,12
+1206,6
@@
int main(int argc, char *argv[]) {
goto finish;
}
goto finish;
}
- sync_fd = eventfd(0, EFD_CLOEXEC);
- if (sync_fd < 0) {
- log_error("Failed to create event fd: %m");
- goto finish;
- }
-
sd_notify(0, "READY=1");
assert_se(sigemptyset(&mask) == 0);
sd_notify(0, "READY=1");
assert_se(sigemptyset(&mask) == 0);
@@
-1221,6
+1215,12
@@
int main(int argc, char *argv[]) {
for (;;) {
siginfo_t status;
for (;;) {
siginfo_t status;
+ sync_fd = eventfd(0, EFD_CLOEXEC);
+ if (sync_fd < 0) {
+ log_error("Failed to create event fd: %m");
+ goto finish;
+ }
+
pid = syscall(__NR_clone, SIGCHLD|CLONE_NEWIPC|CLONE_NEWNS|CLONE_NEWPID|CLONE_NEWUTS|(arg_private_network ? CLONE_NEWNET : 0), NULL);
if (pid < 0) {
if (errno == EINVAL)
pid = syscall(__NR_clone, SIGCHLD|CLONE_NEWIPC|CLONE_NEWNS|CLONE_NEWPID|CLONE_NEWUTS|(arg_private_network ? CLONE_NEWNET : 0), NULL);
if (pid < 0) {
if (errno == EINVAL)