Hi,
cron(8) opens /var/run/cron.sock for communication with crontab(1).
The forked cronjobs have the socked still open.
This prevents restarting cron while a job is running:
(CRON) DEATH (already running)
I think cron's children should not inherit sockets.
ok?
friehm
Index: usr.sbin/cron/do_command.c
===================================================================
RCS file: /cvs/src/usr.sbin/cron/do_command.c,v
retrieving revision 1.56
diff -u -p -r1.56 do_command.c
--- usr.sbin/cron/do_command.c 17 Nov 2015 22:31:44 -0000 1.56
+++ usr.sbin/cron/do_command.c 20 Oct 2017 13:56:27 -0000
@@ -86,6 +86,9 @@ child_process(entry *e, user *u)
/* mark ourselves as different to PS command watchers */
setproctitle("running job");
+ /* close sockets from parent (i.e. cronSock) */
+ closefrom(3);
+
/* discover some useful and important environment settings
*/
usernm = e->pwd->pw_name;