From: Philipp Stephani <p.stephani2@gmail.com>
To: Matthew Leach <matthew@mattleach.net>, Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH 0/5] Add systemd socket launching support.
Date: Sun, 27 Mar 2016 17:21:31 +0000 [thread overview]
Message-ID: <CAArVCkQ0NRxGTP7K=JCw+Q7vjdEQa9sO-2dO_4J5npFFZqM-Tw@mail.gmail.com> (raw)
In-Reply-To: <87fuvcosq5.fsf@mattleach.net>
[-- Attachment #1: Type: text/plain, Size: 620 bytes --]
Matthew Leach <matthew@mattleach.net> schrieb am So., 27. März 2016 um
17:17 Uhr:
> >> +#ifdef HAVE_SYSTEMD
> >> + /* Read the number of sockets passed through by systemd. */
> >> + systemd_socket = sd_listen_fds(0);
> >
> > Isn't it prudent to test the socket descriptor for validity? What if
> > it isn't a socket, for example?
>
> Agreed. I'm thinking about trying getsockname as a test for validity as
> this should also ensure that the socket is already bound.
>
The systemd library has some helper functions for that:
https://www.freedesktop.org/software/systemd/man/sd_is_fifo.html
[-- Attachment #2: Type: text/html, Size: 1029 bytes --]
next prev parent reply other threads:[~2016-03-27 17:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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='CAArVCkQ0NRxGTP7K=JCw+Q7vjdEQa9sO-2dO_4J5npFFZqM-Tw@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=matthew@mattleach.net \
/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.