commit bb3a6ce991b3210583bd710c3b959c544cc3e28f from: Stefan Sperling via: Thomas Adam date: Thu Nov 17 21:39:27 2022 UTC rename GOTD_SOCK_FILENO to GOTD_FILENO_MSG_PIPE for clarity (it's not a socket) commit - 466429a10acdc69e2e92b490782f474e3971d5b0 commit + bb3a6ce991b3210583bd710c3b959c544cc3e28f blob - 42824d38ce5b764e0cbafd41f8c29f10f4e68a7f blob + 55929f3e717b7f2b8f06485f4e58c3a9504c4c3f --- gotd/gotd.c +++ gotd/gotd.c @@ -1983,8 +1983,8 @@ start_child(enum gotd_procid proc_id, const char *chro return pid; } - if (fd != GOTD_SOCK_FILENO) { - if (dup2(fd, GOTD_SOCK_FILENO) == -1) + if (fd != GOTD_FILENO_MSG_PIPE) { + if (dup2(fd, GOTD_FILENO_MSG_PIPE) == -1) fatal("cannot setup imsg fd"); } else if (fcntl(fd, F_SETFD, 0) == -1) fatal("cannot setup imsg fd"); blob - 1137c32a92e87b805d1195b4b06d153a9a53d1fa blob + 8773697218bbd2c0f2f0b4320d20311c0ff48300 --- gotd/gotd.h +++ gotd/gotd.h @@ -24,7 +24,7 @@ #define GOTD_MAXCLIENTS 1024 #define GOTD_FD_RESERVE 5 #define GOTD_FD_NEEDED 6 -#define GOTD_SOCK_FILENO 3 +#define GOTD_FILENO_MSG_PIPE 3 /* Client hash tables need some extra room. */ #define GOTD_CLIENT_TABLE_SIZE (GOTD_MAXCLIENTS * 4) blob - c005863ecbf0e677a2ba3b217fdd20bf00a5ad38 blob + 349b5768badc4d88d707fe79a442572a9762b141 --- gotd/repo_read.c +++ gotd/repo_read.c @@ -890,7 +890,7 @@ repo_read_main(const char *title, int *pack_fds, int * signal(SIGPIPE, SIG_IGN); signal(SIGHUP, SIG_IGN); - imsg_init(&iev.ibuf, GOTD_SOCK_FILENO); + imsg_init(&iev.ibuf, GOTD_FILENO_MSG_PIPE); iev.handler = repo_read_dispatch; iev.events = EV_READ; iev.handler_arg = NULL; blob - 454bcb71c13e57bd5f8dcfc018e842b2c4fe69af blob + 211f8fa03eb545c1a62b09e9680c9e1187a51be4 --- gotd/repo_write.c +++ gotd/repo_write.c @@ -1441,7 +1441,7 @@ repo_write_main(const char *title, int *pack_fds, int signal(SIGPIPE, SIG_IGN); signal(SIGHUP, SIG_IGN); - imsg_init(&iev.ibuf, GOTD_SOCK_FILENO); + imsg_init(&iev.ibuf, GOTD_FILENO_MSG_PIPE); iev.handler = repo_write_dispatch; iev.events = EV_READ; iev.handler_arg = NULL;