Skip to content

Commit 4cde880

Browse files
committed
Fix mismatch between last_start and last_start_attempt
One is real time, the other is monotonic time.
1 parent b2f544e commit 4cde880

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

main/gridinit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ print_process(GString *out, struct child_s *sd)
391391
sd->pid,
392392
CHILD_ENABLED(sd), CHILD_BROKEN(sd), CHILD_RESPAWN(sd),
393393
sd->counter_started, sd->counter_died,
394-
sd->last_start_attempt,
394+
sd->last_start,
395395
sd->rlimits.core_size, sd->rlimits.stack_size, sd->rlimits.nb_files,
396396
sd->uid, sd->gid,
397397
sd->key, sd->group, sd->command);

main/gridinit_cmd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct child_info_s {
6161
gboolean broken;
6262
gboolean breakable;
6363
guint32 user_flags;
64-
time_t last_start_attempt;
64+
time_t last_start;
6565
guint counter_started;
6666
guint counter_died;
6767
struct {
@@ -271,7 +271,7 @@ read_services_list(FILE *in_stream)
271271
ci.respawn = BOOL(atoi(tokens[3]));
272272
ci.counter_started = atoi(tokens[4]);
273273
ci.counter_died = atoi(tokens[5]);
274-
ci.last_start_attempt = atol(tokens[6]);
274+
ci.last_start = atol(tokens[6]);
275275
ci.rlimits.core_size = atol(tokens[7]);
276276
ci.rlimits.stack_size = atol(tokens[8]);
277277
ci.rlimits.nb_files = atol(tokens[9]);
@@ -600,7 +600,7 @@ command_status(int lvl, int argc, char **args)
600600

601601
/* Prepare some fields */
602602
strftime(str_time, sizeof(str_time), "%Y-%m-%d %H:%M:%S",
603-
gmtime(&(ci->last_start_attempt)));
603+
gmtime(&(ci->last_start)));
604604
str_status = get_child_status(ci, kw);
605605

606606
/* Manage counters */

0 commit comments

Comments
 (0)