From f2555e841105a7ead9ed4794fe2b3d185ad7f880 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sun, 27 Oct 2019 16:53:25 -0400 Subject: Set SO_REUSEADDR on binds --- listen.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'listen.c') diff --git a/listen.c b/listen.c index 952d798..1797acf 100644 --- a/listen.c +++ b/listen.c @@ -63,6 +63,10 @@ size_t listenBind(int fds[], size_t cap, const char *host, const char *port) { fds[len] = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if (fds[len] < 0) err(EX_OSERR, "socket"); + int yes = 1; + error = setsockopt(fds[len], SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)); + if (error) err(EX_OSERR, "setsockopt"); + error = bind(fds[len], ai->ai_addr, ai->ai_addrlen); if (error) { warn("%s:%s", host, port); -- cgit 1.4.1 d class='sub'>dontfiles
summary refs log tree commit diff
path: root/www/photo.causal.agency/2025-01-18 (unfollow)
Commit message (Collapse)Author
3 daysAdd y-d templateJune McEnroe
2026-03-23Replace tmppath pledge with rpath wpath cpathJune McEnroe
2026-03-23Add -ll for hilexJune McEnroe
huh. should have always been there I guess, but now it actually matters, at least on OpenBSD?
2026-02-17Remove photo metadata directoriesJune McEnroe
2026-02-17Ignore photo metadataJune McEnroe
I just don't want to be adding all this stuff to git.
2026-02-16Populate films datalist with 20 most recently usedJune McEnroe
2026-02-16Select last used bodyJune McEnroe
2026-02-15Don't break on trip with removed bodyJune McEnroe
2026-02-11Keep manpath.conf sortedJune McEnroe