Skip to content
Snippets Groups Projects
Commit 3a3da81b authored by Moe Jette's avatar Moe Jette
Browse files

Add logic to deal with sleep() being interupted in accounting polling loop,

  could result in reading data too often.
parent 0d579a75
No related branches found
No related tags found
No related merge requests found
......@@ -593,11 +593,16 @@ static int _get_process_data_line(FILE *in, prec_t *prec) {
static void *_watch_tasks(void *arg)
{
int rem;
while(!jobacct_shutdown) { /* Do this until shutdown is requested */
if(!suspended) {
_get_process_data(); /* Update the data */
}
sleep(freq);
rem = freq;
while (rem) /* subject to interupt */
sleep(rem);
}
return NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment