On 07/08/2014 02:00 PM, Yann Ylavic wrote:
On Tue, Jul 8, 2014 at 11:42 AM, <jkal...@apache.org> wrote:
@@ -279,8 +279,35 @@ static apr_status_t close_listeners_on_e
#ifdef HAVE_SYSTEMD
+static int find_systemd_socket(process_rec * process, apr_port_t port) {
+ int fdcount, fd;
+ int sdc = sd_listen_fds(0);
+
+ if (sdc < 0) {
+ ap_log_perror(APLOG_MARK, APLOG_CRIT, sdc, process->pool,
APLOGNO(02486)
+ "find_systemd_socket: Error parsing enviroment, sd_listen_fds
returned %d",
+ sdc);
+ return 1;
+ }
+
+ if (sdc == 0) {
+ ap_log_perror(APLOG_MARK, APLOG_CRIT, sdc, process->pool,
APLOGNO(02487)
+ "find_systemd_socket: At least one socket must be set.");
+ return 1;
+ }
Shouldn't these returns be -1?
Yes, good catch, thanks. Fixed in r1608744.
Jan Kaluza