chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pam_systemd: dup the fd received from logind
[elogind.git]
/
src
/
libsystemd-bus
/
test-bus-chat.c
diff --git
a/src/libsystemd-bus/test-bus-chat.c
b/src/libsystemd-bus/test-bus-chat.c
index efc19c68b3d3d2914a4022198547d4f2e5fd2b8d..a29fbdf9c4a1a15c1a3fc62a2a941e9441dc1f1b 100644
(file)
--- a/
src/libsystemd-bus/test-bus-chat.c
+++ b/
src/libsystemd-bus/test-bus-chat.c
@@
-228,6
+228,8
@@
static int server(sd_bus *bus) {
goto fail;
}
goto fail;
}
+ log_info("Received fd=%d", fd);
+
if (write(fd, &x, 1) < 0) {
log_error("Failed to write to fd: %m");
close_nointr_nofail(fd);
if (write(fd, &x, 1) < 0) {
log_error("Failed to write to fd: %m");
close_nointr_nofail(fd);
@@
-307,6
+309,8
@@
static void* client1(void*p) {
goto finish;
}
goto finish;
}
+ log_info("Sending fd=%d", pp[1]);
+
r = sd_bus_call_method(
bus,
"org.freedesktop.systemd.test",
r = sd_bus_call_method(
bus,
"org.freedesktop.systemd.test",