summaryrefslogtreecommitdiff
path: root/src/app_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app_sock.c')
-rw-r--r--src/app_sock.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/app_sock.c b/src/app_sock.c
index 84b6f4f9..1bc43eda 100644
--- a/src/app_sock.c
+++ b/src/app_sock.c
@@ -28,6 +28,7 @@
#include <sys/xattr.h>
#include <errno.h>
#include <fcntl.h>
+#include <systemd/sd-daemon.h>
#include "app_sock.h"
#include "simple_util.h"
@@ -187,10 +188,21 @@ int __create_server_sock_by_path(char *path)
return fd;
}
+int __create_sock_activation(void)
+{
+ int fds;
+ fds = sd_listen_fds(0);
+ if (fds == 1)
+ return SD_LISTEN_FDS_START;
+ if (fds > 1)
+ _E("Too many file descriptors received.\n");
+ else
+ _D("There is no socket stream");
-
+ return -1;
+}
int __create_agent_client_sock(int uid)
{