Lines Matching refs:ctrlsock
54 static int ctrlsock;
267 if (ctrlsock != 0 || _ctrl_is_slave)
276 /* get uniq hash for ctrlsock name */
281 /* make sure that ctrlsock store path exists */
306 if ((ctrlsock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
316 if (bind(ctrlsock, (struct sockaddr *) &saun, sizeof(struct sockaddr_un)) < 0)
322 if (listen(ctrlsock, 5) < 0)
337 if (ctrlsock)
339 close(ctrlsock);
355 if (ctrlsock == 0)
358 FD_SET(ctrlsock, rfds);
359 *n = MAX(*n, ctrlsock);
380 if (ctrlsock == 0)
386 if (FD_ISSET(ctrlsock, rfds))
388 FD_CLR(ctrlsock, rfds);
390 ns = accept(ctrlsock, (struct sockaddr *) &fsaun, &fromlen);