X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=blobdiff_plain;f=dss.c;h=b475ba7f54483df8a0dc45c1063bbcf2258b8c53;hp=612406038c24052150710afe2a90e77e8b1332d7;hb=a05d84006712ac65c611d494b2b1f1d3bcb27207;hpb=73b1e1c9b290c8d462cc4e7aeb16381711e07a4c diff --git a/dss.c b/dss.c index 6124060..b475ba7 100644 --- a/dss.c +++ b/dss.c @@ -747,19 +747,24 @@ static int select_loop(void) { int ret; /* check every 60 seconds for free disk space */ - struct timeval tv = {.tv_sec = 60, .tv_usec = 0}; + struct timeval tv; for (;;) { fd_set rfds; int low_disk_space; char **rsync_argv; - struct timeval now, *tvp = &tv; + struct timeval now, *tvp; if (rm_pid) tvp = NULL; /* sleep until rm process dies */ + else { /* sleep one minute */ + tv.tv_sec = 60; + tv.tv_usec = 0; + tvp = &tv; + } FD_ZERO(&rfds); FD_SET(signal_pipe, &rfds); - DSS_DEBUG_LOG("tvp: %p, tv_sec: %lu\n", tvp, (long unsigned) tv.tv_sec); + DSS_DEBUG_LOG("tvp: %p, tv_sec : %lu\n", tvp, (long unsigned) tv.tv_sec); ret = dss_select(signal_pipe + 1, &rfds, NULL, tvp); if (ret < 0) return ret;