Complete implementation of forever timeout value in stop schedules
This commit is contained in:
parent
eca4357892
commit
67e2d6033d
@ -351,8 +351,9 @@ int run_stop_schedule(const char *applet,
|
|||||||
|
|
||||||
tkilled += nkilled;
|
tkilled += nkilled;
|
||||||
break;
|
break;
|
||||||
|
case SC_FOREVER:
|
||||||
case SC_TIMEOUT:
|
case SC_TIMEOUT:
|
||||||
if (item->value < 1) {
|
if (item->type == SC_TIMEOUT && item->value < 1) {
|
||||||
item = NULL;
|
item = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -360,7 +361,7 @@ int run_stop_schedule(const char *applet,
|
|||||||
ts.tv_sec = 0;
|
ts.tv_sec = 0;
|
||||||
ts.tv_nsec = POLL_INTERVAL;
|
ts.tv_nsec = POLL_INTERVAL;
|
||||||
|
|
||||||
for (nsecs = 0; nsecs < item->value; nsecs++) {
|
for (nsecs = 0; item->type == SC_FOREVER || nsecs < item->value; nsecs++) {
|
||||||
for (nloops = 0;
|
for (nloops = 0;
|
||||||
nloops < ONE_SECOND / POLL_INTERVAL;
|
nloops < ONE_SECOND / POLL_INTERVAL;
|
||||||
nloops++)
|
nloops++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user