Message ID | 89a3a87651d15c1ff317aaa8d629a208512a6165.1437743469.git.zhaolei@cn.fujitsu.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/task-utils.c b/task-utils.c index 768be94..58f5195 100644 --- a/task-utils.c +++ b/task-utils.c @@ -94,8 +94,10 @@ int task_period_start(struct task_info *info, unsigned int period_ms) return -1; info->periodic.timer_fd = timerfd_create(CLOCK_MONOTONIC, 0); - if (info->periodic.timer_fd == -1) + if (info->periodic.timer_fd == -1) { + info->periodic.timer_fd = 0; return info->periodic.timer_fd; + } info->periodic.wakeups_missed = 0;