• Peter Hutterer's avatar
    systemd-logind: let the logind code decided whether to close an fd · 15460eae
    Peter Hutterer authored
    We can only request one fd per device from systemd-logind. If a fd is re-used
    by the same device, releasing the fd from one device doesn't mean we can close
    it. The systemd code knows when it's really released, so let it close the fd.
    
    Test case: xorg.conf section for an input device with hotplugging enabled.
    evdev detects the duplicate and closes the hotplugged device, which closes the
    fd. The other instance of evdev thinks the fd is still valid so now you're
    playing a double lottery. First, which client(s) will get the evdev fd?
    Second, which requests will be picked up by evdev and which ones will be
    picked up by the client? You'll never know, but the fun is in finding out.
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    15460eae
systemd-logind.h 1.8 KB