commit 8c6fc1468a57de4851e137b55bda5cd838e2f759 from: Stefan Sperling date: Thu Nov 17 15:17:47 2022 UTC rename GOTD_SOCK_FILENO to GOTD_FILENO_MSG_PIPE for clarity (it's not a socket) commit - ea371198ec8b032e31b86ddef231db39756a3b44 commit + 8c6fc1468a57de4851e137b55bda5cd838e2f759 blob - 9a011ae6fc575bcb82edf53a536a9ac764691be3 blob + 751a2f6394bc8c60483c87d808d41b19dfd20c0b --- gotd/gotd.c +++ gotd/gotd.c @@ -1984,8 +1984,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 - 249d3d3235c218b16fe5bcf292918af2438c1a73 blob + abed0bcfbf6fbf7acff490cac29ee2e12f6207cc --- gotd/repo_write.c +++ gotd/repo_write.c @@ -1423,7 +1423,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;