[acpid] * Mon Sep 13 2010 Jiri Skala <jskala at redhat.com> - 2.0.5-3 - fixes #629740 - acpid doesn't fork, but

Jiri Skala jskala at fedoraproject.org
Mon Sep 13 07:21:48 UTC 2010


commit 792aaf025e14c7decae5e5ab33f19ce2104cc91d
Author: Jiri Skala <jskala at localhost.localdomain>
Date:   Mon Sep 13 09:21:41 2010 +0200

    * Mon Sep 13 2010 Jiri Skala <jskala at redhat.com> - 2.0.5-3
    - fixes #629740 - acpid doesn't fork, but systemd unit file claims otherwise

 acpid-2.0.5-forking.patch |   12 ++++++++++++
 acpid.spec                |    7 ++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/acpid-2.0.5-forking.patch b/acpid-2.0.5-forking.patch
new file mode 100644
index 0000000..82f2558
--- /dev/null
+++ b/acpid-2.0.5-forking.patch
@@ -0,0 +1,12 @@
+diff -up acpid-2.0.5/acpid.c.forking acpid-2.0.5/acpid.c
+--- acpid-2.0.5/acpid.c.forking	2010-03-28 15:54:23.000000000 +0200
++++ acpid-2.0.5/acpid.c	2010-09-10 13:38:06.207131183 +0200
+@@ -333,7 +333,7 @@ daemonize(void)
+ 	pid_t pid, sid;
+ 
+     /* already a daemon */
+-    if ( getppid() == 1 ) return 0;
++    //if ( getppid() == 1 ) return 0;
+ 
+ 	/* fork off the parent process */
+ 	pid = fork();
diff --git a/acpid.spec b/acpid.spec
index 04a4bf9..9da505a 100644
--- a/acpid.spec
+++ b/acpid.spec
@@ -1,7 +1,7 @@
 Summary: ACPI Event Daemon
 Name: acpid
 Version: 2.0.5
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+
 Group: System Environment/Daemons
 Source: http://tedfelix.com/linux/acpid-%{version}.tar.gz
@@ -12,6 +12,7 @@ Source4: acpid.power.sh
 Source5: acpid.service
 
 Patch1: acpid-2.0.2-makefile.patch
+Patch2: acpid-2.0.5-forking.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 ExclusiveArch: ia64 x86_64 %{ix86}
@@ -30,6 +31,7 @@ acpid is a daemon that dispatches ACPI events to user-space programs.
 %setup -q
 
 %patch1 -p1 -b .makefile
+%patch2 -p1 -b .forking
 
 %build
 make %{?_smp_mflags}
@@ -111,6 +113,9 @@ if [ "$1" -ge "1" ]; then
 fi
 
 %changelog
+* Mon Sep 13 2010 Jiri Skala <jskala at redhat.com> - 2.0.5-3
+- fixes #629740 - acpid doesn't fork, but systemd unit file claims otherwise
+
 * Wed Aug 11 2010 Jiri Skala <jskala at redhat.com> - 2.0.5-2
 - fixes #617317 - Providing native systemd file for upcoming F14 Feature Systemd
 


More information about the scm-commits mailing list