aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_network_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-13 14:53:30 +0000
committerChristian Grothoff <christian@grothoff.org>2015-07-13 14:53:30 +0000
commit3104aa430ae360599dd54369a8cb1fd61f07894c (patch)
tree6b8d87ddc782d50e51d1107bb13597218b5e9a1f /src/include/gnunet_network_lib.h
parent13a3089d561ed7332da25a7c461cdcc633c6b855 (diff)
downloadgnunet-3104aa430ae360599dd54369a8cb1fd61f07894c.tar.gz
gnunet-3104aa430ae360599dd54369a8cb1fd61f07894c.zip
automatically clean up left-over Unix domain socket files when trying to bind (fixes #3723)
Diffstat (limited to 'src/include/gnunet_network_lib.h')
-rw-r--r--src/include/gnunet_network_lib.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h
index f70509830..83d820a5b 100644
--- a/src/include/gnunet_network_lib.h
+++ b/src/include/gnunet_network_lib.h
@@ -106,6 +106,21 @@ char *
106GNUNET_NETWORK_shorten_unixpath (char *unixpath); 106GNUNET_NETWORK_shorten_unixpath (char *unixpath);
107 107
108 108
109#ifndef WINDOWS
110/**
111 * If services crash, they can leave a unix domain socket file on the
112 * disk. This needs to be manually removed, because otherwise both
113 * bind() and connect() for the respective address will fail. In this
114 * function, we test if such a left-over file exists, and if so,
115 * remove it (unless there is a listening service at the address).
116 *
117 * @param un unix domain socket address to check
118 */
119void
120GNUNET_NETWORK_unix_precheck (const struct sockaddr_un *un);
121#endif
122
123
109/** 124/**
110 * Accept a new connection on a socket. Configure it for non-blocking 125 * Accept a new connection on a socket. Configure it for non-blocking
111 * IO and mark it as non-inheritable to child processes (set the 126 * IO and mark it as non-inheritable to child processes (set the