Skip to content

Commit

Permalink
use the configure runstatedir directory for pid file
Browse files Browse the repository at this point in the history
  • Loading branch information
sgerwk authored and t8m committed Nov 1, 2021
1 parent 75843b4 commit cba1f87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ cron-paths.h: Makefile
*/ \
#define CRON_ALLOW "$(sysconfdir)/cron.allow" \
#define CRON_DENY "$(sysconfdir)/cron.deny" \
\
/* directory of cron pid file */ \
#define CRON_PID_DIR "$(runstatedir)" \
\
/* 4.3BSD-style crontab f.e. /etc/crontab */ \
#define SYSCRONTAB "$(SYSCRONTAB)" \
Expand Down
10 changes: 7 additions & 3 deletions src/pathnames.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@
* PIDDIR must end in '/'.
* (Don't ask why the default is "/etc/".)
*/
#ifdef _PATH_VARRUN
# define PIDDIR _PATH_VARRUN
#ifdef CRON_PID_DIR
# define PIDDIR CRON_PID_DIR "/"
#else
# define PIDDIR SYSCONFDIR "/"
# ifdef _PATH_VARRUN
# define PIDDIR _PATH_VARRUN
# else
# define PIDDIR SYSCONFDIR "/"
# endif
#endif
#define PIDFILE "crond.pid"
#define _PATH_CRON_PID PIDDIR PIDFILE
Expand Down

0 comments on commit cba1f87

Please # to comment.