diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-10-18 15:58:06 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-10-18 15:58:06 +0100 |
commit | 5ce34add77fa3517a01e63b915c5f4e3241af470 (patch) | |
tree | ee5e13606e15ad4d8c2154e3334c8b2711dc34f8 /compat | |
parent | 934f357149dba903f091237e7ea7c7ba78471614 (diff) |
Do not attempt to connect to the socket as a client if systemd is active, from
Julien Moutinho in GitHub issue 3345.
Diffstat (limited to 'compat')
-rw-r--r-- | compat/systemd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compat/systemd.c b/compat/systemd.c index 9a3adbb3..cce42ed4 100644 --- a/compat/systemd.c +++ b/compat/systemd.c @@ -26,6 +26,12 @@ #include "tmux.h" int +systemd_activated(void) +{ + return (sd_listen_fds(0) >= 1); +} + +int systemd_create_socket(int flags, char **cause) { int fds; |