-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The cond service occasionally shows status "Active: deactivating" #139
Labels
Comments
If there was any other signal that is by default ignored we could use that to signal the reload. The only such signal is SIGURG which is in POSIX1.2001 only. I assume we could use it as we do not use sockets so it should not be received spuriously. On the other hand, why do you call restart and reload simultaneously? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I found something wrong with my crond service
Execute the commands
systemctl restart crond
andsystemctl reload crond
at the same time , The cond service occasionally shows statusActive: deactivating
.When the command
systemctl reload crond
is executed, systemd will send theHUP
to the crond process. Under normal circumstances, the crond process will modify the behavior of theHUP
signal (without interrupting the process, and only record the received signal in the global variable). However, after executing the commandsystemctl restart crond
, the crond process received the HUP signal sent by the commandsystemctl reload crond
before it could modify the HUP signal behavior just after the crond process was started, which caused the crond process to be interrupted, so the crond service status appears asActive: deactivating
.I try to add a dead loop at the beginning of the main function of the crond service to reproduce this situation
Replace process to
/usr/sbin/crond
, Execute the commandssystemctl restart crond
andsystemctl reload crond
successively, the result as followsI also tried to change the
Type
ofcron.service
toforking
, and set thePIDFile
to/var/run/cron.pid
, but this seems to be getting worseThe text was updated successfully, but these errors were encountered: