SHA256
1
0
forked from pool/systemd
systemd/0004-socket-properly-handle-if-our-service-vanished-durin.patch
Stephan Kulow f026ff3dde Accepting request 235517 from Base:System
- Add upstream patches
  0001-Do-not-unescape-unit-names-in-Install-section.patch
  0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch

- Add upstream patch
  1020-udev-keyboard-also-hook-into-change-events.patch

- Add upstream patches to update keyboard data base
  0001-keymap-Add-Lenovo-Enhanced-USB-Keyboard.patch
  0002-keymap-Asus-EeePC-touchpad-toggle-key.patch
- Add upstream patches
  0001-nspawn-allow-to-bind-mount-journal-on-top-of-a-non-e.patch
  0002-nspawn-restore-journal-directory-is-empty-check.patch
  0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
  0004-socket-properly-handle-if-our-service-vanished-durin.patch

- Add upstream patches
  0001-Do-not-unescape-unit-names-in-Install-section.patch
  0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch

- Add upstream patch
  1020-udev-keyboard-also-hook-into-change-events.patch

- Add upstream patches to update keyboard data base
  0001-keymap-Add-Lenovo-Enhanced-USB-Keyboard.patch
  0002-keymap-Asus-EeePC-touchpad-toggle-key.patch
- Add upstream patches
  0001-nspawn-allow-to-bind-mount-journal-on-top-of-a-non-e.patch
  0002-nspawn-restore-journal-directory-is-empty-check.patch
  0003-core-never-consider-failure-when-reading-drop-ins-fa.patch

OBS-URL: https://build.opensuse.org/request/show/235517
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=189
2014-05-28 04:43:08 +00:00

31 lines
1.1 KiB
Diff

From 640ace4a8de907994a1b95f6d368c3e6a8fcf60f Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 22 May 2014 16:56:21 +0900
Subject: [PATCH] socket: properly handle if our service vanished during
runtime
---
src/core/socket.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git src/core/socket.c src/core/socket.c
index 05af8fe..aca20fd 100644
--- src/core/socket.c
+++ 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;
--
1.7.9.2