Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Staging:C
systemd-mini
0007-sd-event-don-t-accidentally-turn-of-watchd...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0007-sd-event-don-t-accidentally-turn-of-watchdog-timer-e.patch of Package systemd-mini
From 75145780813957ecbe6835f2c8bc20113a3605d2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Tue, 25 Mar 2014 00:01:51 +0100 Subject: [PATCH] sd-event: don't accidentally turn of watchdog timer event if we determine 0 --- src/libsystemd/sd-event/sd-event.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git src/libsystemd/sd-event/sd-event.c src/libsystemd/sd-event/sd-event.c index d6a3d1c..4aabec1 100644 --- src/libsystemd/sd-event/sd-event.c +++ src/libsystemd/sd-event/sd-event.c @@ -2087,6 +2087,11 @@ static int arm_watchdog(sd_event *e) { timespec_store(&its.it_value, t); + /* Make sure we never set the watchdog to 0, which tells the + * kernel to disable it. */ + if (its.it_value.tv_sec == 0 && its.it_value.tv_nsec == 0) + its.it_value.tv_nsec = 1; + r = timerfd_settime(e->watchdog_fd, TFD_TIMER_ABSTIME, &its, NULL); if (r < 0) return -errno; -- 1.7.9.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor