diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-06-07 21:46:59 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-06-07 21:46:59 +0200 |
commit | f934a2908efa99e2d39ad1c3ba01137204baddaf (patch) | |
tree | 0f2d6832b0a301b228c9e4d49dc0e404e49f82bc /src/mds-respawn.c | |
parent | finish implementation of mds-respawn (diff) | |
download | mds-f934a2908efa99e2d39ad1c3ba01137204baddaf.tar.gz mds-f934a2908efa99e2d39ad1c3ba01137204baddaf.tar.bz2 mds-f934a2908efa99e2d39ad1c3ba01137204baddaf.tar.xz |
test and fix mds-respawn + add missed staging: monotonic clock should be raw
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-respawn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mds-respawn.c b/src/mds-respawn.c index 8d5fb0a..84c4b26 100644 --- a/src/mds-respawn.c +++ b/src/mds-respawn.c @@ -182,6 +182,7 @@ static void spawn_server(size_t index) { states[index].pid = pid; states[index].state = ALIVE; + live_count++; return; } @@ -442,7 +443,7 @@ static void joined_with_server(pid_t pid, int status) return; } - if (ended.tv_sec - states[i].started.tv_sec < RESPAWN_TIME_LIMIT_SECONDS) + if (ended.tv_sec - states[i].started.tv_sec < interval) { eprintf("%s died abnormally, burying because it died too fast.", commands[i][0]); states[i].state = DEAD_AND_BURIED; |