logind: fix closing of button input devices
authorLennart Poettering <lennart@poettering.net>
Mon, 7 Dec 2020 09:51:15 +0000 (10:51 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 10 Dec 2020 16:39:17 +0000 (17:39 +0100)
commit82b884a7935931cfab9714cf58baceb2995b2b8c
tree36dfd2676b36f21a6f318d7c40c8544163c19761
parentb6a663def6bb18edd7c4f4f8d1bebf60c9be5a68
logind: fix closing of button input devices

This is a fix of #17751. Specifically:

1. Sort #include headers again

2. Remove tabs, as per coding style

3. Don't install fds in half-initialized objects

4. Use asynchronous_close() everywhere

That all said:

Quit frankly, I am not convinced we should do all this at all. If
close()ing of these input devices is really that slow, then this should
probably be fixed in the kernel, not worked around in userspace like
this.

(cherry picked from commit c74d5fe25d53263c143f0a9c2698d8bb483e398c)
src/login/logind-button.c