diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-05-13 23:22:13 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-05-15 15:30:00 +0200 |
commit | 574634bcacb01efe15ca2742effd461a5b7afb5f (patch) | |
tree | 3d3c23df00cc51ae1e3ccbd139260105465ace7e /src | |
parent | 05cae7f3431446236139434ee58a6275f3cb31e8 (diff) |
core: close socket fds asynchronously
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018928.html
Diffstat (limited to 'src')
-rw-r--r-- | src/core/service.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/service.c b/src/core/service.c index 172233013e..70e7635114 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -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")) { |