- perror("socket");
- printf("init-ng: socket() failed!\n");
- }
-
- local.sun_family = AF_UNIX;
- strcpy(local.sun_path, socketPath);
- unlink(local.sun_path);
- int len = strlen(local.sun_path) + sizeof(local.sun_family);
-
- if (bind(s, (struct sockaddr *)&local, len) == -1)
- {
- perror("bind");
- printf("init-ng: bind() failed!\n");
- }
-
- // Queue size of 20 ought to be enough for anybody ;-)
- if (listen(s, 20) == -1)
- {
- perror("listen");
- printf("init-ng: listen() failed!\n");