No notification sounds after suspend; incorrect login manager API usage
Versions
- OS: Debian GNU/Linux
- Gajim version: 5364c198
Root cause
gajim/logind_listener.py fails to hold an inhibitor FD. To reproduce:
- Start gajim.
Querying the ListInhibitors method on org.freedesktop.login1.Manager does not show gajim. It is expected that gajim should be listed.
gajim doesn't use the with_unix_fd_list variant of the call method when calling inhibit method on org.freedesktop.login1.Manager; thus the fd never gets referenced/held and is immediately closed.
Proximal cause
Also, the above issue has the following side effect:
- Start gajim
- Suspend and resume the host.
Inspecting via /proc, gajim has closed fd 0 (standard input). It is expected that gajim should not close stdin as it is provided to executed sub processes.
This problem is notable because it causes any executed paplay (user for notification sounds) to not play sounds (after a suspend resume cycle), as paplay expects stdin to be open irrespective of whether it is used.