Age | Commit message (Collapse) | Author | |
---|---|---|---|
2020-09-25 | supervise-daemon: only log debug logs when verbose mode is active | William Hubbs | |
2020-01-11 | supervise-daemon: Fix segfault when executable does not exist | Wolf | |
When executable is provided just by name (and therefore searched in a path), exec_file is reset to NULL every time. exists() handles it being NULL just fine, but dereferencing it in eerror does not work. Fixes #326 Fixes #327 | |||
2019-03-29 | supervise-daemon: allow --respawn-max to be zero | William Hubbs | |
2018-12-24 | src/rc/supervise-daemon.c: formatting fixes | philhofer | |
Fix misleading indentation and other erroneous whitespace. This fixes #273. | |||
2018-12-23 | src/rc/supervise-daemon.c: do not pass NULL to strcmp | philhofer | |
The following will cause a segfault due to NULL being passed to strcmp(3) $ RC_SVCNAME=foo supervise-daemon Fix the bounds check on argc in main. If argc<=1, then it is not safe to dereference argv[1]. | |||
2018-12-21 | fix compiler warnings | William Hubbs | |
2018-12-20 | supervise-daemon: do not use the exec_service() function | William Hubbs | |
In order to run healthcheck() and the unhealthy() function, add an exec_command call to the supervisor. Another difference is This function also logs errors instead of attempting to display them. This is for #271. | |||
2018-12-06 | supervise-daemon: fix busy loop | William Hubbs | |
This fixes #264. | |||
2018-12-04 | supervise-daemon: redirect std{in,out,err} to /dev/null after demonizing | Alexander Zubkov | |
This fixes #239. | |||
2018-12-03 | src/rc/supervise-daemon.c: fix style issue | Austin English | |
This is for #263. | |||
2018-12-03 | supervise-daemon: use a default pid file if one is not specified | William Hubbs | |
Since the pid file is internal to us, start moving toward deprecating it by not requiring the user to specify it. In the next release, I plan on working on code to start phasing out the use of a pid file if this is possible. | |||
2018-12-02 | supervise-daemon: mark a service failed if it respawns too many times | William Hubbs | |
2018-12-02 | supervise-daemon: make respawn-max and respawn-period independent settings | William Hubbs | |
2018-12-02 | supervise-daemon: add support for a fifo | William Hubbs | |
This will allow us to signal the daemon we are supervising as well as send other commands to the supervisor in the future. This fixes #227. | |||
2018-12-02 | supervise-daemon: rework signal handling and main loop | William Hubbs | |
This is needed in preparation for adding support for a fifo to allow us to communicate with the supervisor to ask it to signal the child it is supervising. | |||
2018-11-28 | supervise-daemon: fix type of exiting flag | William Hubbs | |
2018-11-15 | supervise-daemon: make the pidfile an implementation detail | William Hubbs | |
The pidfile of the supervisor doesn't need to be adjustable by the service script. It is only used so the supervisor can stop itself when the --stop option is used. | |||
2018-11-05 | supervise-daemon: reap zombies | William Hubbs | |
We need to make sure to reap zombies so that we can shut down successfully. Fixes #252. Possibly related to #250. | |||
2018-10-23 | supervise-daemon: add health checks | William Hubbs | |
Health checks are a way to monitor a service and make sure it stays healthy. If a service is not healthy, it will be automatically restarted after running the unhealthy() function to clean up. | |||
2018-10-15 | supervise-daemon: fix respawn_max off by one | Zac Medico | |
Fix the comparison between respawn_count and respawn_max so that respawn_max = 1 will allow for one respawn. Since respawn_count is incremented before the comparison, use a 'greater than' comparison so that respawn will be triggered when respawn_count is equal to respawn_max. Fixes: https://github.com/OpenRC/openrc/issues/247 Fixes: https://github.com/OpenRC/openrc/issues/248 | |||
2018-10-13 | misc: whitespace fixes | Austin English | |
2018-10-06 | supervise-daemon: use nanosleep() instead of sleep() | William Hubbs | |
We will be using sigalrm in this process for health checking, and sigalrm cannot be used with sleep() safely. | |||
2018-06-27 | supervise-daemon.c: clean up memory leaks | William Hubbs | |
2018-06-19 | supervise-daemon: convert snprintf calls to xasprintf | William Hubbs | |
2018-03-14 | supervise-daemon: fix off-by-one error | William Hubbs | |
2018-02-27 | supervise-daemon: make an error message more verbose | William Hubbs | |
2018-02-22 | supervise-daemon: zero out the cmdline buffer when it is allocated | William Hubbs | |
2018-02-21 | supervise-daemon: remove references to PATH_MAX | William Hubbs | |
2017-11-27 | fix FreeBSD build | William Hubbs | |
This is for #186. | |||
2017-10-30 | fix issue with --reexec call | William Hubbs | |
2017-10-27 | supervise-daemon: use RC_SVCNAME as the first argument to the daemon | William Hubbs | |
This makes ps show which service the supervisor is monitoring. | |||
2017-10-27 | supervise-daemon: fix logging for reexec and the child command line | William Hubbs | |
2017-10-27 | log as supervise-daemon not the service | William Hubbs | |
2017-10-26 | supervise-daemon: clarify a log message | William Hubbs | |
2017-10-26 | supervise-daemon: log the command line we run to spawn the child process | William Hubbs | |
2017-10-26 | supervise-daemon: log with the service name instead of "supervise-daemon" | William Hubbs | |
2017-10-26 | supervise-daemon: remove child_pid from saved options during shutdown | William Hubbs | |
This allows us to detect when the supervisor dies unexpectedly because in that case child_pid will still exist. | |||
2017-10-24 | supervise-daemon: fix build issue for >=glibc-2.26 | William Hubbs | |
X-Gentoo-Bug: 635334 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=635334 | |||
2017-10-24 | supervise-daemon: multiple fixes | William Hubbs | |
- Harden against dying by handling all signals that would terminate the program and adding --reexec support - factor the supervisor into its own function - fix test for whether we are already running | |||
2017-10-18 | supervise-daemon: elevate some log messages to warnings | William Hubbs | |
Prior to this change, we were logging unexpected terminations of daemons we were supervising at the info level. This change moves the logs to warnings. | |||
2017-09-18 | ignore sigchld when shutting down the supervised process | William Hubbs | |
We need to do this to skip the zombie state for the child process since we are not easily able to wait() for it. | |||
2017-09-18 | typo fix | William Hubbs | |
2017-09-18 | typo fix | William Hubbs | |
2017-09-18 | supervise-daemon: code cleanup | William Hubbs | |
Clean up the process for killing an active supervisor when stopping. | |||
2017-09-14 | add quiet switch to do_stop in src-schedules.c | William Hubbs | |
This allows supervise-daemon to run this code without attempting to print some status messages used by start-stop-daemon. | |||
2017-09-06 | add quiet parameter to run_stop_schedule | William Hubbs | |
2017-09-06 | add retry option to supervise-daemon | William Hubbs | |
The --retry option for supervise-daemon defines how the supervisor will attempt to stop the child process it is monitoring. It is defined when the supervisor is started since stopping the supervisor just sends a signal to the active supervisor. This fixes #160. | |||
2017-08-23 | move get_pid function to a shared file | William Hubbs | |
2017-05-12 | supervise-daemon: save start time and respawn count before dropping privs | William Hubbs | |
2017-05-11 | fix from_time_t function | William Hubbs | |