chiark / gitweb /
core: close socket fds asynchronously
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 13 May 2014 21:22:13 +0000 (23:22 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 May 2014 13:30:00 +0000 (15:30 +0200)
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018928.html

src/core/service.c

index 1722330..70e7635 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/reboot.h>
 #include <sys/syscall.h>
 
+#include "async.h"
 #include "manager.h"
 #include "unit.h"
 #include "service.h"
@@ -222,7 +223,7 @@ static void service_close_socket_fd(Service *s) {
         if (s->socket_fd < 0)
                 return;
 
-        s->socket_fd = safe_close(s->socket_fd);
+        s->socket_fd = asynchronous_close(s->socket_fd);
 }
 
 static void service_connection_unref(Service *s) {
@@ -2712,7 +2713,7 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
                         log_debug_unit(u->id, "Failed to parse socket-fd value %s", value);
                 else {
 
-                        safe_close(s->socket_fd);
+                        asynchronous_close(s->socket_fd);
                         s->socket_fd = fdset_remove(fds, fd);
                 }
         } else if (streq(key, "main-exec-status-pid")) {