[systemd-commits] 2 commits - src/libsystemd-bus src/machine
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Dec 23 11:26:02 PST 2013
src/libsystemd-bus/sd-event.c | 2 +-
src/machine/machinectl.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit f98a58fe894d34e4d9675757180f34a8523c936e
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Dec 23 20:22:33 2013 +0100
sd-event: fix return code of sd_event_run()
diff --git a/src/libsystemd-bus/sd-event.c b/src/libsystemd-bus/sd-event.c
index bfc798c..0317088 100644
--- a/src/libsystemd-bus/sd-event.c
+++ b/src/libsystemd-bus/sd-event.c
@@ -2029,7 +2029,7 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
p = event_next_pending(e);
if (!p) {
- r = 0;
+ r = 1;
goto finish;
}
commit 6261f11fc3d0a8b63c5afa5313d96607a008b54e
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Dec 23 19:15:43 2013 +0100
machinectl: fix success check when getting pty from within container
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index ab9060a..b3a7018 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -452,10 +452,7 @@ static int openpt_in_namespace(pid_t pid, int flags) {
pair[1] = -1;
r = wait_for_terminate(child, &si);
- if (r < 0 || si.si_code != CLD_EXITED || si.si_status != EXIT_SUCCESS || master < 0) {
-
- if (master >= 0)
- close_nointr_nofail(master);
+ if (r < 0 || si.si_code != CLD_EXITED || si.si_status != EXIT_SUCCESS) {
return r < 0 ? r : -EIO;
}
@@ -479,6 +476,9 @@ static int openpt_in_namespace(pid_t pid, int flags) {
master = fds[0];
}
+ if (master < 0)
+ return -EIO;
+
return master;
}
More information about the systemd-commits
mailing list