[Nix-dev] [NixOS/nixos] a5969: sshd: Do detach into thebackground

Nicolas Pierron nicolas.b.pierron at gmail.com
Mon Oct 8 00:07:26 CEST 2012


Hi,

On Sun, Oct 7, 2012 at 10:35 AM, Michael Raskin <7c6f434c at mail.ru> wrote:
>> > Commit: a5969634f4da94f85ffbce2ce81f760fd73c67e5
>> >
>> > Log Message:
>> > -----------
>> > sshd: Do detach into the background
>> >
>> > This is necessary to ensure that jobs that need to start after sshd
>> > work properly.
>>
>>this seems counter-intuitive to me. How is running sshd asynchronously
>>going to make the service more reliable for dependent jobs that start
>>after it? A synchronous start-up feels more predictable to me. What am I
>>missing?
>
> I guess Systemd lacks the means to say that "started" means "listening
> on proper TCP port". And without this, sshd detaching is the only clear
> point in time that allows to decide that it somehow started.

If I remember correctly, Systemd will create a listening socket before
sshd starts and then sshd will flush the socket content.  I guess you
can check if a service is started by waiting on answers produced by
the service.

http://0pointer.de/blog/projects/systemd.html


-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/


More information about the nix-dev mailing list