No longer leak FDs on VT switch.
Modified-by: Povilas Kanapickas <povilas@radix.lt> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/997>
This commit is contained in:
parent
5677de586f
commit
2631cad85d
|
@ -398,6 +398,11 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
|
||||||
dbus_error_free(&error);
|
dbus_error_free(&error);
|
||||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* fd will be received via DBus if and only if pause == 0, so it
|
||||||
|
* only needs to be closed in that code path
|
||||||
|
*/
|
||||||
} else
|
} else
|
||||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||||
|
|
||||||
|
@ -432,6 +437,7 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
|
||||||
info->active = TRUE;
|
info->active = TRUE;
|
||||||
|
|
||||||
if (pdev) {
|
if (pdev) {
|
||||||
|
close(fd);
|
||||||
pdev->flags &= ~XF86_PDEV_PAUSED;
|
pdev->flags &= ~XF86_PDEV_PAUSED;
|
||||||
} else
|
} else
|
||||||
systemd_logind_set_input_fd_for_all_devs(major, minor, fd,
|
systemd_logind_set_input_fd_for_all_devs(major, minor, fd,
|
||||||
|
|
Loading…
Reference in New Issue