summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-bus/bus-container.c2
-rw-r--r--src/libsystemd/sd-bus/bus-socket.c2
-rw-r--r--src/libsystemd/sd-bus/test-bus-chat.c2
-rw-r--r--src/libsystemd/sd-event/test-event.c8
-rw-r--r--src/libsystemd/sd-login/test-login.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/libsystemd/sd-bus/bus-container.c b/src/libsystemd/sd-bus/bus-container.c
index 2cd0e1f99e..6bd7ad6318 100644
--- a/src/libsystemd/sd-bus/bus-container.c
+++ b/src/libsystemd/sd-bus/bus-container.c
@@ -116,7 +116,7 @@ int bus_container_connect_socket(sd_bus *b) {
}
int bus_container_connect_kernel(sd_bus *b) {
- _cleanup_close_pipe_ int pair[2] = { -1, -1 };
+ _cleanup_close_pair_ int pair[2] = { -1, -1 };
_cleanup_close_ int pidnsfd = -1, mntnsfd = -1, rootfd = -1;
union {
struct cmsghdr cmsghdr;
diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
index bccf501222..2e8f008be4 100644
--- a/src/libsystemd/sd-bus/bus-socket.c
+++ b/src/libsystemd/sd-bus/bus-socket.c
@@ -736,7 +736,7 @@ int bus_socket_exec(sd_bus *b) {
pid = fork();
if (pid < 0) {
- close_pipe(s);
+ safe_close_pair(s);
return -errno;
}
if (pid == 0) {
diff --git a/src/libsystemd/sd-bus/test-bus-chat.c b/src/libsystemd/sd-bus/test-bus-chat.c
index 1b9d98fa75..c0abc7a697 100644
--- a/src/libsystemd/sd-bus/test-bus-chat.c
+++ b/src/libsystemd/sd-bus/test-bus-chat.c
@@ -356,7 +356,7 @@ finish:
sd_bus_error_free(&error);
- close_pipe(pp);
+ safe_close_pair(pp);
return INT_TO_PTR(r);
}
diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c
index 68bb2b0ca8..3342ec6968 100644
--- a/src/libsystemd/sd-event/test-event.c
+++ b/src/libsystemd/sd-event/test-event.c
@@ -239,10 +239,10 @@ int main(int argc, char *argv[]) {
sd_event_unref(e);
- close_pipe(a);
- close_pipe(b);
- close_pipe(d);
- close_pipe(k);
+ safe_close_pair(a);
+ safe_close_pair(b);
+ safe_close_pair(d);
+ safe_close_pair(k);
return 0;
}
diff --git a/src/libsystemd/sd-login/test-login.c b/src/libsystemd/sd-login/test-login.c
index 2ab083bb71..9e326de5b4 100644
--- a/src/libsystemd/sd-login/test-login.c
+++ b/src/libsystemd/sd-login/test-login.c
@@ -28,7 +28,7 @@
#include "strv.h"
static void test_login(void) {
- _cleanup_close_pipe_ int pair[2] = { -1, -1 };
+ _cleanup_close_pair_ int pair[2] = { -1, -1 };
_cleanup_free_ char *pp = NULL, *qq = NULL;
int r, k;
uid_t u, u2;