From: Matthew Leach <matthew@mattleach.net>
To: emacs-devel <emacs-devel@gnu.org>
Cc: Matthew Leach <matthew@mattleach.net>
Subject: [PATCH 0/5] Add systemd socket launching support.
Date: Sat, 26 Mar 2016 21:16:37 +0000 [thread overview]
Message-ID: <1459027002-13215-1-git-send-email-matthew@mattleach.net> (raw)
Systemd has the ability to create a socket, launch a daemon upon
connection to that socket and hand over the socket to the new process
to handle. In Emacs' case, we can delay the start of the Emacs daemon
until emacsclient is called upon a socket.
These patches can be tested by creating minimal systemd setup. First,
create two systemd unit files:
emacs.socket
============
[Socket]
ListenStream=/home/foobar/test.socket
[Install]
WantedBy=sockets.target
emacs.service
=============
[Service]
Type=forking
ExecStart=/path/to/emacs --daemon
Once these files have been created, execute:
# systemctl daemon-reload
# systemctl start enacs.socket
The socket will now be created, and when a connection is made, the
Emacs daemon will be started:
# emacsclient -s /home/foobar/test.socket -t
Feedback & comments welcome!
Thanks,
Matt
Matthew Leach (5):
Check for libsystemd when building Emacs.
Read the number of sockets passed by systemd.
Permit systemd-allocated socket file-descriptors to be used.
Allow the systed socket fd to be retrieved.
When set, use the systemd socket descriptor.
configure.ac | 13 +++++++++++++
lisp/server.el | 5 ++++-
src/Makefile.in | 6 +++++-
src/emacs.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
src/process.c | 28 +++++++++++++++++++++-------
5 files changed, 90 insertions(+), 9 deletions(-)
--
2.7.4
next reply other threads:[~2016-03-26 21:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-26 21:16 Matthew Leach [this message]
2016-03-26 21:16 ` [PATCH 1/5] Check for libsystemd when building Emacs Matthew Leach
2016-03-26 21:16 ` [PATCH 2/5] Read the number of sockets passed by systemd Matthew Leach
2016-03-26 21:16 ` [PATCH 3/5] Permit systemd-allocated socket file-descriptors to be used Matthew Leach
2016-03-27 12:08 ` Lars Magne Ingebrigtsen
2016-03-27 12:23 ` Matthew Leach
2016-03-27 12:42 ` Andreas Schwab
2016-03-27 13:38 ` Matthew Leach
2016-03-27 13:05 ` Lars Magne Ingebrigtsen
2016-03-27 13:39 ` Matthew Leach
2016-03-26 21:16 ` [PATCH 4/5] Allow the systed socket fd to be retrieved Matthew Leach
2016-03-26 21:16 ` [PATCH 5/5] When set, use the systemd socket descriptor Matthew Leach
2016-03-27 0:47 ` [PATCH 0/5] Add systemd socket launching support Alan Mackenzie
2016-03-27 0:59 ` Alexis
2016-03-27 8:44 ` Matthew Leach
2016-03-27 11:15 ` Alexis
2016-03-27 8:41 ` Matthew Leach
2016-03-27 13:48 ` Wolfgang Jenkner
2016-03-27 13:53 ` Matthew Leach
2016-03-27 14:18 ` Wolfgang Jenkner
2016-03-27 15:49 ` Mark Oteiza
2016-03-27 18:16 ` Matthew Leach
2016-03-27 14:49 ` Eli Zaretskii
2016-03-27 15:17 ` Matthew Leach
2016-03-27 15:23 ` Eli Zaretskii
2016-03-27 17:21 ` Philipp Stephani
2016-03-27 18:10 ` Matthew Leach
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=1459027002-13215-1-git-send-email-matthew@mattleach.net \
--to=matthew@mattleach.net \
--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.