diff --git a/doc/man-pages/pod1/xstat_fs_test.pod b/doc/man-pages/pod1/xstat_fs_test.pod index b405cb7b11..f8d94db10e 100644 --- a/doc/man-pages/pod1/xstat_fs_test.pod +++ b/doc/man-pages/pod1/xstat_fs_test.pod @@ -94,7 +94,8 @@ Cache Manager. The default is 30 seconds. =item B<-period> > Sets the number of minutes the program runs; at the end of this period of -time, the program exits. The default is 10 minutes. +time, the program exits. The default is 10 minutes. Period 0 means run +forever. =item B<-debug> diff --git a/src/xstat/xstat_cm.c b/src/xstat/xstat_cm.c index a7d0a033f9..9850d43f48 100644 --- a/src/xstat/xstat_cm.c +++ b/src/xstat/xstat_cm.c @@ -662,8 +662,6 @@ xstat_cm_Wait(int sleep_secs) } } else if (sleep_secs == 0) { /* Sleep forever. */ - tv.tv_sec = 24 * 60; - tv.tv_usec = 0; if (xstat_cm_debug) fprintf(stderr, "[%s] going to sleep ...\n", rn); while (1) { @@ -671,7 +669,7 @@ xstat_cm_Wait(int sleep_secs) 0, /*Descriptors ready for reading */ 0, /*Descriptors ready for writing */ 0, /*Descriptors with exceptional conditions */ - &tv); /*Timeout structure */ + NULL); /* NULL timeout means "forever" */ if (code < 0) { fprintf(stderr, "[%s] select() error %d\n", rn, errno); break; diff --git a/src/xstat/xstat_fs.c b/src/xstat/xstat_fs.c index 3ebf97f59e..3145a008da 100644 --- a/src/xstat/xstat_fs.c +++ b/src/xstat/xstat_fs.c @@ -856,8 +856,6 @@ xstat_fs_Wait(int sleep_secs) } } else if (sleep_secs == 0) { /* Sleep forever. */ - tv.tv_sec = 24 * 60; - tv.tv_usec = 0; if (xstat_fs_debug) fprintf(stderr, "[ %s ] going to sleep ...\n", rn); while (1) { @@ -865,7 +863,7 @@ xstat_fs_Wait(int sleep_secs) 0, /*Descriptors ready for reading */ 0, /*Descriptors ready for writing */ 0, /*Descriptors with exceptional conditions */ - &tv); /*Timeout structure */ + NULL); /* NULL timeout means "forever" */ if (code < 0) { fprintf(stderr, "[%s] select() error %d\n", rn, errno); break;