]>
git.ipfire.org Git - thirdparty/git.git/blob - unix-stream-server.h
1 #ifndef UNIX_STREAM_SERVER_H
2 #define UNIX_STREAM_SERVER_H
4 #include "unix-socket.h"
6 struct unix_ss_socket
{
13 * Create a Unix Domain Socket at the given path under the protection
14 * of a '.lock' lockfile.
16 * Returns 0 on success, -1 on error, -2 if socket is in use.
18 int unix_ss_create(const char *path
,
19 const struct unix_stream_listen_opts
*opts
,
21 struct unix_ss_socket
**server_socket
);
24 * Close and delete the socket.
26 void unix_ss_free(struct unix_ss_socket
*server_socket
);
29 * Return 1 if the inode of the pathname to our socket changes.
31 int unix_ss_was_stolen(struct unix_ss_socket
*server_socket
);
33 #endif /* UNIX_STREAM_SERVER_H */