From 6b4050ab9cf9d678a1d6b7af7af7494f8533dbca Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Thu, 11 May 2017 16:18:41 -0500 Subject: fix from_time_t function --- src/rc/supervise-daemon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/rc/supervise-daemon.c') diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c index a971e6a3..f3335fa2 100644 --- a/src/rc/supervise-daemon.c +++ b/src/rc/supervise-daemon.c @@ -186,6 +186,7 @@ static void child_process(char *exec, char **argv, char *svcname, char cmdline[PATH_MAX]; time_t start_time; char start_count_string[20]; + char start_time_string[20]; #ifdef HAVE_PAM pam_handle_t *pamh = NULL; @@ -343,7 +344,8 @@ static void child_process(char *exec, char **argv, char *svcname, syslog(LOG_INFO, "Running command line: %s", cmdline); if (svcname) { start_time = time(NULL); - rc_service_value_set(svcname, "start_time", from_time_t(start_time)); +from_time_t(start_time_string, start_time); + rc_service_value_set(svcname, "start_time", start_time_string); sprintf(start_count_string, "%i", start_count); rc_service_value_set(svcname, "start_count", start_count_string); } -- cgit v1.2.3