[arch-commits] Commit in systemd/trunk (2 files)
Dave Reisner
dreisner at nymeria.archlinux.org
Tue Oct 1 13:17:12 UTC 2013
Date: Tuesday, October 1, 2013 @ 15:17:11
Author: dreisner
Revision: 195491
upgpkg: systemd 207-7
- backport fix for hang on stopping Type=notify units (FS#37007)
Added:
systemd/trunk/0001-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch
Modified:
systemd/trunk/PKGBUILD
-----------------------------------------------------------------+
0001-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch | 74 ++++++++++
PKGBUILD | 5
2 files changed, 78 insertions(+), 1 deletion(-)
Added: 0001-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch
===================================================================
--- 0001-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch (rev 0)
+++ 0001-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch 2013-10-01 13:17:11 UTC (rev 195491)
@@ -0,0 +1,74 @@
+From 7400b9d2e99938d17b281d7df43680eade18666e Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Tue, 1 Oct 2013 05:06:56 +0200
+Subject: [PATCH] core: whenever a new PID is passed to us, make sure we watch
+ it
+
+---
+ src/core/service.c | 21 +++++++++++++++------
+ 1 file changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/src/core/service.c b/src/core/service.c
+index 24b7bef..6792024 100644
+--- a/src/core/service.c
++++ b/src/core/service.c
+@@ -191,7 +191,13 @@ static int service_set_main_pid(Service *s, pid_t pid) {
+ if (pid == getpid())
+ return -EINVAL;
+
+- service_unwatch_main_pid(s);
++ if (s->main_pid == pid && s->main_pid_known)
++ return 0;
++
++ if (s->main_pid != pid) {
++ service_unwatch_main_pid(s);
++ exec_status_start(&s->main_exec_status, pid);
++ }
+
+ s->main_pid = pid;
+ s->main_pid_known = true;
+@@ -205,8 +211,6 @@ static int service_set_main_pid(Service *s, pid_t pid) {
+ } else
+ s->main_pid_alien = false;
+
+- exec_status_start(&s->main_exec_status, pid);
+-
+ return 0;
+ }
+
+@@ -2696,8 +2700,10 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
+
+ if (parse_pid(value, &pid) < 0)
+ log_debug_unit(u->id, "Failed to parse main-pid value %s", value);
+- else
+- service_set_main_pid(s, (pid_t) pid);
++ else {
++ service_set_main_pid(s, pid);
++ unit_watch_pid(UNIT(s), pid);
++ }
+ } else if (streq(key, "main-pid-known")) {
+ int b;
+
+@@ -3389,6 +3395,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) {
+ log_debug_unit(u->id,
+ "%s: got %s", u->id, e);
+ service_set_main_pid(s, pid);
++ unit_watch_pid(UNIT(s), pid);
+ }
+ }
+
+@@ -3685,8 +3692,10 @@ static void service_bus_query_pid_done(
+ (s->state == SERVICE_START ||
+ s->state == SERVICE_START_POST ||
+ s->state == SERVICE_RUNNING ||
+- s->state == SERVICE_RELOAD))
++ s->state == SERVICE_RELOAD)){
+ service_set_main_pid(s, pid);
++ unit_watch_pid(UNIT(s), pid);
++ }
+ }
+
+ int service_set_socket_fd(Service *s, int fd, Socket *sock) {
+--
+1.8.4
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2013-10-01 11:32:33 UTC (rev 195490)
+++ PKGBUILD 2013-10-01 13:17:11 UTC (rev 195491)
@@ -4,7 +4,7 @@
pkgbase=systemd
pkgname=('systemd' 'systemd-sysvcompat')
pkgver=207
-pkgrel=6
+pkgrel=7
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
makedepends=('acl' 'cryptsetup' 'dbus-core' 'docbook-xsl' 'gobject-introspection' 'gperf'
@@ -18,6 +18,7 @@
0001-polkit-Avoid-race-condition-in-scraping-proc.patch
0001-swap-fix-reverse-dependencies.patch
0002-swap-create-.wants-symlink-to-auto-swap-devices.patch
+ 0001-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch
0001-cryptsetup-generator-allow-specifying-options-in-pro.patch
0001-man-document-luks.options-kernel-commandline.patch
0001-udev-rules-avoid-erroring-on-trailing-whitespace.patch)
@@ -28,6 +29,7 @@
'9eb0a46aa2a3a6d74117f9a174dbe168'
'182be4c729aaecde249b7b05b48a481f'
'b54fbe35e2689ac36cda9ac4a5a86f24'
+ '6067cc4f0565c02484918c3e1b05cbfa'
'20e65eefdffe384edc4acebe9e01c873'
'9fb76e01f41beb60e331908f7f1e04bc'
'1f0bfc22e09b9dfe53f4485fab7af2ee')
@@ -38,6 +40,7 @@
patch -Np1 <"$srcdir"/0001-swap-fix-reverse-dependencies.patch
patch -Np1 <"$srcdir"/0002-swap-create-.wants-symlink-to-auto-swap-devices.patch
patch -Np1 <"$srcdir"/0001-polkit-Avoid-race-condition-in-scraping-proc.patch
+ patch -Np1 <"$srcdir"/0001-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch
patch -Np1 <"$srcdir"/0001-cryptsetup-generator-allow-specifying-options-in-pro.patch
patch -Np1 <"$srcdir"/0001-man-document-luks.options-kernel-commandline.patch
patch -Np1 <"$srcdir"/0001-udev-rules-avoid-erroring-on-trailing-whitespace.patch
More information about the arch-commits
mailing list