[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] Add systemd socket launching support

From: Live System User
Subject: Re: [PATCH v3] Add systemd socket launching support
Date: Sat, 02 Apr 2016 20:53:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Matthew Leach <address@hidden> writes:

> Hi Stefan,
> Stefan Monnier <address@hidden> writes:
>>> +#include <systemd/sd-daemon.h>
>> [..]
>>> +#ifdef HAVE_SYSTEMD
>>> +      /* Read the number of sockets passed through by systemd. */
>>> +      systemd_socket = sd_listen_fds(1);
>> AFAICT, this is the core of the dependency to systemd.
> Yes, that's correct.  There is also a call to `sd_is_socket' just below
> this line.
>> Could you explain to us, how the socket information is actually
>> passed?  Is it passed via an env-var?
> I believe so, I'm not a systemd expert, though.  Looking at the man page
> for the sd_listen_fds:
> Internally, sd_listen_fds() checks whether the $LISTEN_PID environment
> variable equals the daemon PID. If not, it returns
> immediately. Otherwise, it parses the number passed in the $LISTEN_FDS
> environment variable, then sets the FD_CLOEXEC flag for the parsed
> number of file descriptors starting from SD_LISTEN_FDS_START. Finally,
> it returns the parsed number.
> HTH,

If Emacs is compiled and configured for systemd integration, would it
still be possible to startup Emacs(daemon) and use emacsclient *without*
utilizing systemd, including from an X startup script?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]