[Top][All Lists]

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

Re: [PATCH 0/5] Add systemd socket launching support.

From: Philipp Stephani
Subject: Re: [PATCH 0/5] Add systemd socket launching support.
Date: Sun, 27 Mar 2016 17:21:31 +0000

Matthew Leach <address@hidden> 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

reply via email to

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