all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 0/5] Add systemd socket launching support.
@ 2016-03-26 21:16 Matthew Leach
  2016-03-26 21:16 ` [PATCH 1/5] Check for libsystemd when building Emacs Matthew Leach
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Matthew Leach @ 2016-03-26 21:16 UTC (permalink / raw)
  To: emacs-devel; +Cc: Matthew Leach

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




^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2016-03-27 18:16 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-26 21:16 [PATCH 0/5] Add systemd socket launching support Matthew Leach
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

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.