convert to use imsg_get_fd()
commit2c52c623be04b56400a5c94cc8d86b6fda214d16
authorOmar Polo <op@omarpolo.com>
Tue, 30 Jan 2024 11:25:08 +0000 (30 11:25 +0000)
committerOmar Polo <op@omarpolo.com>
Tue, 30 Jan 2024 11:25:08 +0000 (30 11:25 +0000)
treea58ba3dc249592d6f5f56c60fe69ad6e194cdc7e
parent50b6e2b853641f2523a175298f865fc44f44d8a7
convert to use imsg_get_fd()

While here also fix a fd leak in got-read-pack.  We were dup'ing
imsg.fd without closing imsg.fd later; instead just use imsg_get_fd()
to extract the file descriptor.

Tested by falsifian and Kyle Ackerman, thanks!

'go ahead' stsp@
18 files changed:
gotd/auth.c
gotd/gotd.c
gotd/repo_read.c
gotd/repo_write.c
gotd/session.c
gotwebd/config.c
lib/serve.c
libexec/got-fetch-pack/got-fetch-pack.c
libexec/got-index-pack/got-index-pack.c
libexec/got-read-blob/got-read-blob.c
libexec/got-read-commit/got-read-commit.c
libexec/got-read-gitconfig/got-read-gitconfig.c
libexec/got-read-gotconfig/got-read-gotconfig.c
libexec/got-read-object/got-read-object.c
libexec/got-read-pack/got-read-pack.c
libexec/got-read-tag/got-read-tag.c
libexec/got-read-tree/got-read-tree.c
libexec/got-send-pack/got-send-pack.c