diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-03 14:16:45 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-03 14:16:45 +0800 |
commit | de79bab343e8628679861bba9ec96b675d07046e (patch) | |
tree | 821b8e40551530c3ef60a4effd6c53838dfc6e81 /git2d/main.c | |
parent | gti2d: Set umask to 0077 to secure the UNIX domain socket (diff) | |
download | forge-de79bab343e8628679861bba9ec96b675d07046e.tar.gz forge-de79bab343e8628679861bba9ec96b675d07046e.tar.zst forge-de79bab343e8628679861bba9ec96b675d07046e.zip |
git2d: Ignore SIGPIPE
Diffstat (limited to '')
-rw-r--r-- | git2d/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git2d/main.c b/git2d/main.c index 345f66d..0919415 100644 --- a/git2d/main.c +++ b/git2d/main.c @@ -7,6 +7,7 @@ #include <errno.h> #include <git2.h> #include <pthread.h> +#include <signal.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/types.h> @@ -125,6 +126,8 @@ main(int argc, char **argv) errx(1, "provide one argument: the socket path"); } + signal(SIGPIPE, SIG_IGN); + git_libgit2_init(); int sock; |