summary refs log tree commit diff
path: root/dispatch.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-05-18 14:44:19 -0400
committerJune McEnroe <june@causal.agency>2020-05-18 14:44:19 -0400
commit4f7066dada94a402d867ceca9a668a6e64d12f3c (patch)
tree9f9aa93653fad589a85d843e656ab428435cc08c /dispatch.c
parentEnable TCP keepalive with half-hour idle (diff)
downloadpounce-4f7066dada94a402d867ceca9a668a6e64d12f3c.tar.gz
pounce-4f7066dada94a402d867ceca9a668a6e64d12f3c.zip
Don't bother setting SO_NOSIGPIPE
We need to ignore SIGPIPE anyway for other platforms.
Diffstat (limited to 'dispatch.c')
-rw-r--r--dispatch.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/dispatch.c b/dispatch.c
index 28a4d00..0de7434 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -214,7 +214,7 @@ int main(int argc, char *argv[]) {
 
 	cap_rights_t dirRights, sockRights, unixRights, bindRights;
 	cap_rights_init(&dirRights, CAP_CONNECTAT);
-	cap_rights_init(&sockRights, CAP_EVENT, CAP_RECV, CAP_SEND, CAP_SETSOCKOPT);
+	cap_rights_init(&sockRights, CAP_EVENT, CAP_RECV, CAP_SEND);
 	cap_rights_init(&unixRights, CAP_CONNECT, CAP_SEND);
 	cap_rights_init(&bindRights, CAP_LISTEN, CAP_ACCEPT);
 	cap_rights_merge(&bindRights, &sockRights);
@@ -255,13 +255,6 @@ int main(int argc, char *argv[]) {
 					warn("accept");
 					continue;
 				}
-
-				int yes = 1;
-				error = setsockopt(
-					sock, SOL_SOCKET, SO_NOSIGPIPE, &yes, sizeof(yes)
-				);
-				if (error) err(EX_OSERR, "setsockopt");
-
 				eventAdd(sock);
 				continue;
 			}