From 5ce34add77fa3517a01e63b915c5f4e3241af470 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 18 Oct 2022 15:58:06 +0100 Subject: Do not attempt to connect to the socket as a client if systemd is active, from Julien Moutinho in GitHub issue 3345. --- compat/systemd.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compat/systemd.c') diff --git a/compat/systemd.c b/compat/systemd.c index 9a3adbb3..cce42ed4 100644 --- a/compat/systemd.c +++ b/compat/systemd.c @@ -25,6 +25,12 @@ #include "tmux.h" +int +systemd_activated(void) +{ + return (sd_listen_fds(0) >= 1); +} + int systemd_create_socket(int flags, char **cause) { -- cgit