Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/unix-stream-server.h # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / unix-stream-server.h` 33 lines ยท 760 bytes Raw Blame History 1 #ifndef UNIX_STREAM_SERVER_H 2 #define UNIX_STREAM_SERVER_H 3 4 #include "unix-socket.h" 5 6 struct unix_ss_socket { 7 char *path_socket; 8 struct stat st_socket; 9 int fd_socket; 10 }; 11 12 /* 13 * Create a Unix Domain Socket at the given path under the protection 14 * of a '.lock' lockfile. 15 * 16 * Returns 0 on success, -1 on error, -2 if socket is in use. 17 */ 18 int unix_ss_create(const char *path, 19 const struct unix_stream_listen_opts *opts, 20 long timeout_ms, 21 struct unix_ss_socket **server_socket); 22 23 /* 24 * Close and delete the socket. 25 */ 26 void unix_ss_free(struct unix_ss_socket *server_socket); 27 28 /* 29 * Return 1 if the inode of the pathname to our socket changes. 30 */ 31 int unix_ss_was_stolen(struct unix_ss_socket *server_socket); 32 33 #endif /* UNIX_STREAM_SERVER_H */