#include "socket-server.h"
#include "socket-util.h"
#include "xmalloc.h"
+#include "util.h"
struct pa_socket_server {
int ref;
goto finish;
}
+ pa_fd_set_cloexec(nfd, 1);
+
if (!s->on_connection) {
close(nfd);
goto finish;
goto fail;
}
+ pa_fd_set_cloexec(fd, 1);
+
sa.sun_family = AF_LOCAL;
strncpy(sa.sun_path, filename, sizeof(sa.sun_path)-1);
sa.sun_path[sizeof(sa.sun_path) - 1] = 0;
goto fail;
}
+ pa_fd_set_cloexec(fd, 1);
+
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
fprintf(stderr, "setsockopt(): %s\n", strerror(errno));