From 83c30390c25b86080953267b87ad8cc6fa559bea Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Wed, 4 Dec 2002 18:59:42 +0000
Subject: [PATCH] Add missing initialization of timeout.

---
 src/srun/io.c  | 1 +
 src/srun/msg.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/srun/io.c b/src/srun/io.c
index 7290ad5b0c2..4b9d83cf1c2 100644
--- a/src/srun/io.c
+++ b/src/srun/io.c
@@ -141,6 +141,7 @@ _io_thr_poll(void *job_arg)
 	xassert(job != NULL);
 
 	debug3("IO thread pid = %ld", getpid());
+	time_startup = time(NULL);
 
 	/* need ioport + msgport + stdin + 2*nprocs fds */
 	fds = xmalloc(numfds*sizeof(*fds));
diff --git a/src/srun/msg.c b/src/srun/msg.c
index 64113375514..f9b26a174b9 100644
--- a/src/srun/msg.c
+++ b/src/srun/msg.c
@@ -262,7 +262,7 @@ _msg_thr_poll(job_t *job)
 	while (1) {
 		while ((rc = poll(fds, nfds, POLL_TIMEOUT_MSEC)) <= 0) {
 			if (rc == 0) {	/* timeout */
-				i = time(NULL)-time_last_msg;
+				i = time(NULL) - time_last_msg;
 				if (job->state == SRUN_JOB_FAILED)
 					pthread_exit(0);
 				else if (check_launch_msg_sent)
-- 
GitLab