|
From: | Philipp Stephani |
Subject: | Re: [PATCH 0/5] Add systemd socket launching support. |
Date: | Sun, 27 Mar 2016 17:21:31 +0000 |
>> +#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.
[Prev in Thread] | Current Thread | [Next in Thread] |