Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2025-02-18 | hooks: Fix the race condition that causes EPIPE | Runxi Yu | 1 | -0/+10 | |
The hooks handler in the main daemon didn't wait for the hook client to write fully, and sometimes prematurely closes the connection, causing the hook client's splice to return EPIPE (or SIGPIPE if the signal handler wasn't installed). To remedy this, we call shutdown(sock, SHUT_WR) in the client, so that attempts to read on the server side return EOF. Then we can simply use io.Copy(&buf, conn) on the server side to fetch all of the data into a buffer. | |||||
2025-02-18 | git_hooks_client.c: Ignore SIGPIPE | Runxi Yu | 1 | -0/+6 | |
2025-02-18 | git_hooks_client.c: Allow ECONNRESET when splicing sock -> stderr | Runxi Yu | 1 | -1/+2 | |
Not exactly sure what's happening, but it looks like conn.Close() in Go sometimes produces an ECONNRESET in here. | |||||
2025-02-17 | hooks, etc.: Authenticate hooks, and handle them in the spawning thread | Runxi Yu | 1 | -1/+28 | |
2025-02-17 | git_hooks_client: Send argc/argv over the UNIX domain socket | Runxi Yu | 1 | -5/+34 | |
2025-02-17 | git_hooks_client.c: Explain the code in more detail | Runxi Yu | 1 | -7/+28 | |
2025-02-17 | git_hooks_client.c: Splice socket to stderr | Runxi Yu | 1 | -15/+42 | |
This allows the daemon to send status messages to the hook handler. | |||||
2025-02-17 | git_hooks_client.c: Clarify error messages | Runxi Yu | 1 | -10/+10 | |
2025-02-17 | git_hooks_client.c: Get return value from unix socket | Runxi Yu | 1 | -1/+20 | |
2025-02-17 | git_hooks_client: Restructure for clarity | Runxi Yu | 1 | -23/+28 | |
2025-02-17 | git_hooks_client: Produce useful error message on missing env var | Runxi Yu | 1 | -0/+1 | |
2025-02-17 | git_hooks_client: Ensure stdin is a pipe | Runxi Yu | 1 | -1/+22 | |
2025-02-17 | *: Restructure build system | Runxi Yu | 1 | -3/+0 | |
2025-02-17 | git_hooks_client: Splice stdin | Runxi Yu | 2 | -10/+15 | |
Requires stdin to be a pipe. So `cat | ./git_hooks_client` works while `./git_hooks_client` in a terminal directly does not (character devices are not pipes). | |||||
2025-02-17 | git_hooks{.go,_client}: Add stub for git hook clients | Runxi Yu | 3 | -0/+45 | |