X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fsocket.c;h=31fc2a25269a659125ee42f284792e8040943af8;hb=96415cad2fdd8d280ae94b02651b5f826a2f7f3d;hp=aaaa8d6499b94da2f8e864fcaeb936dc8a107ec5;hpb=e821075a23fdfa3ca7738fc30bb2d4c430fe10c0;p=elogind.git diff --git a/src/core/socket.c b/src/core/socket.c index aaaa8d649..31fc2a252 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -1254,6 +1254,7 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) { UNIT(s)->manager->cgroup_supported, UNIT(s)->cgroup_path, UNIT(s)->id, + 0, NULL, s->exec_runtime, &pid); @@ -1475,6 +1476,13 @@ static void socket_enter_running(Socket *s, int cfd) { /* Flush all sockets by closing and reopening them */ socket_close_fds(s); + r = socket_open_fds(s); + if (r < 0) { + log_warning_unit(UNIT(s)->id, "%s failed to listen on sockets: %s", UNIT(s)->id, strerror(-r)); + socket_enter_stop_pre(s, SOCKET_FAILURE_RESOURCES); + return; + } + r = socket_watch_fds(s); if (r < 0) { log_warning_unit(UNIT(s)->id, "%s failed to watch sockets: %s", UNIT(s)->id, strerror(-r)); @@ -2417,7 +2425,6 @@ const UnitVTable socket_vtable = { .bus_interface = "org.freedesktop.systemd1.Socket", .bus_vtable = bus_socket_vtable, - .bus_changing_properties = bus_socket_changing_properties, .bus_set_property = bus_socket_set_property, .bus_commit_properties = bus_socket_commit_properties,