emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3] Add systemd socket launching support


From: Stefan Monnier
Subject: Re: [PATCH v3] Add systemd socket launching support
Date: Thu, 31 Mar 2016 13:11:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> 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.

Then I think it would be better to follow an approach like the one with
which you started (i.e. without the internal systemd_socket variable),
so the systemd-specific code is limited to just a function that returns
an FD, and then everything else is code that could be used for other
purposes (such as xinetd) and can be explained/documented independently
from systemd.


        Stefan "IIUC"



reply via email to

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