* [gentoo-commits] proj/openrc:0.38.x commit in: src/rc/
@ 2018-06-29 14:12 William Hubbs
0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2018-06-29 14:12 UTC (permalink / raw
To: gentoo-commits
commit: e36e9a30eb830ea27b467383fa2ae02cd2b0d9d4
Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Thu Jun 28 21:08:57 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jun 29 14:07:47 2018 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=e36e9a30
rc-status: initialize uptime pointer to prevent memory corruption
This fixes #231.
src/rc/rc-status.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c
index 85e71dbb..cebdc5ed 100644
--- a/src/rc/rc-status.c
+++ b/src/rc/rc-status.c
@@ -87,7 +87,7 @@ static char *get_uptime(const char *service)
time_t diff_hours = (time_t) 0;
time_t diff_mins = (time_t) 0;
time_t diff_secs = (time_t) 0;
- char *uptime;
+ char *uptime = NULL;
if (state & RC_SERVICE_STARTED) {
start_count = rc_service_value_get(service, "start_count");
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/openrc:0.38.x commit in: src/rc/
@ 2018-10-19 21:08 William Hubbs
0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2018-10-19 21:08 UTC (permalink / raw
To: gentoo-commits
commit: 93c8cbe68428dcf7823a6483d30698ba001f4271
Author: Zac Medico <zmedico <AT> gmail <DOT> com>
AuthorDate: Sat Oct 13 19:32:45 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Oct 19 21:01:07 2018 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=93c8cbe6
supervise-daemon: fix respawn_max off by one
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
src/rc/supervise-daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index 8d56b8d4..e5e817d1 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -507,7 +507,7 @@ static void supervisor(char *exec, char **argv)
first_spawn = 0;
} else
respawn_count++;
- if (respawn_count >= respawn_max) {
+ if (respawn_count > respawn_max) {
syslog(LOG_WARNING,
"respawned \"%s\" too many times, exiting", exec);
exiting = true;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-19 21:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-19 21:08 [gentoo-commits] proj/openrc:0.38.x commit in: src/rc/ William Hubbs
-- strict thread matches above, loose matches on Subject: below --
2018-06-29 14:12 William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox