Accepting request 131689 from Base:System
- When the cron daemon does not fork, as it is the case when using systemd, pid files are useless. avoid creating them in the first place. (forwarded request 130827 from elvigia) OBS-URL: https://build.opensuse.org/request/show/131689 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cronie?expand=0&rev=40
This commit is contained in:
commit
2decd810ac
22
cronie-nofork-nopid.patch
Normal file
22
cronie-nofork-nopid.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- src/misc.c.orig
|
||||||
|
+++ src/misc.c
|
||||||
|
@@ -293,6 +293,8 @@ void acquire_daemonlock(int closeflag) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if(NoFork == 1) return; //move along, nothing to do here..
|
||||||
|
+
|
||||||
|
if (fd == -1) {
|
||||||
|
pidfile = _PATH_CRON_PID;
|
||||||
|
/* Initial mode is 0600 to prevent flock() race/DoS. */
|
||||||
|
--- src/cron.c.orig
|
||||||
|
+++ src/cron.c
|
||||||
|
@@ -600,7 +600,7 @@ static void sigchld_handler(int x) {
|
||||||
|
}
|
||||||
|
|
||||||
|
static void quit(int x) {
|
||||||
|
- (void) unlink(_PATH_CRON_PID);
|
||||||
|
+ if(NoFork == 0) unlink(_PATH_CRON_PID);
|
||||||
|
_exit(0);
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 15 00:48:54 UTC 2012 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- When the cron daemon does not fork, as it is the case
|
||||||
|
when using systemd, pid files are useless. avoid creating
|
||||||
|
them in the first place.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 25 10:38:29 UTC 2012 - coolo@suse.com
|
Mon Jun 25 10:38:29 UTC 2012 - coolo@suse.com
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ Patch7: cronie-1.4.7-disable_logging.patch
|
|||||||
# PATCH-FIX-UPSTREAM use run-crons instead of run-parts for anacron (bnc#689494)
|
# PATCH-FIX-UPSTREAM use run-crons instead of run-parts for anacron (bnc#689494)
|
||||||
Patch8: cronie-anacron-1.4.7-run-crons.patch
|
Patch8: cronie-anacron-1.4.7-run-crons.patch
|
||||||
Patch9: cronie-1.4.8-bug_756197.diff
|
Patch9: cronie-1.4.8-bug_756197.diff
|
||||||
|
Patch10: cronie-nofork-nopid.patch
|
||||||
Conflicts: cron <= 4.1
|
Conflicts: cron <= 4.1
|
||||||
# When finish update protection of sles11 we could uncomment line bellow and drop all
|
# When finish update protection of sles11 we could uncomment line bellow and drop all
|
||||||
# ugly hacks with subpackage cron needed for proper update proces
|
# ugly hacks with subpackage cron needed for proper update proces
|
||||||
@ -101,7 +102,7 @@ overloaded in settings.
|
|||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9
|
%patch9
|
||||||
cp %{S:7} ./cron_to_cronie.README
|
cp %{S:7} ./cron_to_cronie.README
|
||||||
|
%patch10
|
||||||
%build
|
%build
|
||||||
# fill macro CRON_VERSION it is used in top three lines of crontab file,should be reworked
|
# fill macro CRON_VERSION it is used in top three lines of crontab file,should be reworked
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -DCRON_VERSION=\\\"%{version}\\\""
|
export CFLAGS="$RPM_OPT_FLAGS -DCRON_VERSION=\\\"%{version}\\\""
|
||||||
|
Loading…
Reference in New Issue
Block a user