From: Live System User <nyc4bos@aol.com>
To: emacs-devel@gnu.org
Subject: Re: [PATCH v3] Add systemd socket launching support
Date: Sat, 02 Apr 2016 20:53:41 -0400 [thread overview]
Message-ID: <87a8lbzf56.fsf@aol.com> (raw)
In-Reply-To: 871t6qkc3h.fsf@mattleach.net
Matthew Leach <matthew@mattleach.net> writes:
> Hi Stefan,
>
> Stefan Monnier <monnier@iro.umontreal.ca> 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?
Thanks.
next prev parent reply other threads:[~2016-04-03 0:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 20:53 [PATCH v3] Add systemd socket launching support Matthew Leach
2016-03-31 12:55 ` Stefan Monnier
2016-03-31 13:31 ` Matthew Leach
2016-03-31 17:11 ` Stefan Monnier
2016-03-31 17:38 ` Matthew Leach
2016-03-31 17:41 ` Eli Zaretskii
2016-03-31 18:14 ` Stefan Monnier
2016-03-31 19:27 ` Matthew Leach
2016-03-31 19:32 ` Matthew Leach
2016-03-31 19:34 ` Eli Zaretskii
2016-03-31 21:22 ` Stefan Monnier
2016-04-01 7:10 ` Eli Zaretskii
2016-04-01 13:17 ` Stefan Monnier
2016-04-01 13:41 ` Eli Zaretskii
2016-04-01 18:43 ` Stefan Monnier
2016-04-01 19:47 ` Matthew Leach
2016-04-01 19:58 ` Eli Zaretskii
2016-04-03 0:53 ` Live System User [this message]
2016-03-31 16:32 ` Eli Zaretskii
2016-03-31 16:51 ` Matthew Leach
2016-03-31 16:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8lbzf56.fsf@aol.com \
--to=nyc4bos@aol.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.