Message ID | 507ed44cfada9f4eee2cab8e276a75dc4921a6b9.1437999624.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;