I am writing a client application that connects to a server process through a Unix domain socket. If the server process is not running, I want the client to wait until the server starts and listens for connections on the socket.
I currently have a retry loop in the client that calls connect () every second until it is successfully connected to the socket.
Is there any function that I can call that will simply block until a specific named socket is created (for example, "/ var / mysock") and is not bound to the server process?
Not the complete answer, but ...
Linux, inotify :
inotify
unlink
IN_DELETE_SELF
bind
IN_CREATE
, connect ' , listen. , , . , inotify .
connect
listen
, , , Google .
, , , , . . connect() , try stat() , , , S_ISSOCK(), stat.h. , , connect().
connect()
stat()
S_ISSOCK()
stat.h
, , , , . , , . . , , , , , " ".
Source: https://habr.com/ru/post/1716759/More articles:PowerShell: Copy-Item Cannot find path - powershellHow to unload .dll using C #? - c #PHP equivalent for INET_NTOA and INET_ATON - phpИзменение домена при аутентификации с помощью IE8 - authenticationПоиск SharePoint 2007 (wss) и Не удалось проверить данные Исключение - sharepointHow to do this using the java expression language - javaUsing Curry to Define Grails Tags - closuresProblems saving a previously saved object in Google App Engine (Java) - javaPHP object class variable - oopJavascript RTE with spellchecker - javascriptAll Articles