lmkd: fix handling of EPOLLHUP for pidfd am: 667fdbfe92 am: b018e55b7b
Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/3268491 Change-Id: I613ee58987d09da8aa418c124aaf32e19824c868 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
9d0787ef90
12
lmkd.cpp
12
lmkd.cpp
|
|
@ -3911,11 +3911,15 @@ static void mainloop(void) {
|
||||||
*/
|
*/
|
||||||
for (i = 0, evt = &events[0]; i < nevents; ++i, evt++) {
|
for (i = 0, evt = &events[0]; i < nevents; ++i, evt++) {
|
||||||
if ((evt->events & EPOLLHUP) && evt->data.ptr) {
|
if ((evt->events & EPOLLHUP) && evt->data.ptr) {
|
||||||
ALOGI("lmkd data connection dropped");
|
|
||||||
handler_info = (struct event_handler_info*)evt->data.ptr;
|
handler_info = (struct event_handler_info*)evt->data.ptr;
|
||||||
watchdog.start();
|
if (handler_info->handler == kill_done_handler) {
|
||||||
ctrl_data_close(handler_info->data);
|
call_handler(handler_info, &poll_params, evt->events);
|
||||||
watchdog.stop();
|
} else {
|
||||||
|
ALOGI("lmkd data connection dropped");
|
||||||
|
watchdog.start();
|
||||||
|
ctrl_data_close(handler_info->data);
|
||||||
|
watchdog.stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue