[systemd-commits] src/core

Lennart Poettering lennart at kemper.freedesktop.org
Thu May 22 00:57:12 PDT 2014


 src/core/socket.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 640ace4a8de907994a1b95f6d368c3e6a8fcf60f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu May 22 16:56:21 2014 +0900

    socket: properly handle if our service vanished during runtime

diff --git a/src/core/socket.c b/src/core/socket.c
index 05af8fe..aca20fd 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1503,6 +1503,12 @@ static void socket_enter_running(Socket *s, int cfd) {
                         }
 
                 if (!pending) {
+                        if (!UNIT_ISSET(s->service)) {
+                                log_error_unit(UNIT(s)->id, "%s: service to activate vanished, refusing activation.", UNIT(s)->id);
+                                r = -ENOENT;
+                                goto fail;
+                        }
+
                         r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT_DEREF(s->service), JOB_REPLACE, true, &error, NULL);
                         if (r < 0)
                                 goto fail;



More information about the systemd-commits mailing list