1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-02-13 13:41:54 +00:00

miracle-dispd: add watchdog and SIGKILL for it

to prevent no reponse and unable to be terminated issue. this is a temp solution
This commit is contained in:
Derek Dai 2017-03-28 17:44:44 +08:00
parent 06223cab3e
commit 2e3f055bd2
No known key found for this signature in database
GPG key ID: E109CC97553EF009
2 changed files with 6 additions and 0 deletions

View file

@ -8,6 +8,7 @@ After=miracle-wifid.service
BusName=org.freedesktop.miracle.wfd BusName=org.freedesktop.miracle.wfd
Environment=LOG_LEVEL=trace Environment=LOG_LEVEL=trace
ExecStart=@CMAKE_INSTALL_PREFIX@/bin/miracle-dispd ExecStart=@CMAKE_INSTALL_PREFIX@/bin/miracle-dispd
KillSignal=SIGKILL
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -513,6 +513,11 @@ int main(int argc, char **argv)
goto unref_loop; goto unref_loop;
} }
r = sd_event_set_watchdog(event, true);
if (0 > r) {
goto unref_event;
}
source = sd_source_new(event); source = sd_source_new(event);
if(!source) { if(!source) {
r = -ENOMEM; r = -ENOMEM;