Commit Diff


commit - edca7a667dcb5e2698b6729aece8d0afadcbc805
commit + cd1db57e49723e38c55e6b86cc8123fecd389ee7
blob - cd527684c45a60e3c604889ca3fb1a3f94ebf2b4
blob + e202efef1d899a13eed237db063dc45818bd74bc
--- gotd/gotd.c
+++ gotd/gotd.c
@@ -768,6 +768,11 @@ recv_connect(uint32_t *client_id, struct imsg *imsg)
 		err = got_error(GOT_ERR_PRIVSEP_NO_FD);
 		goto done;
 	}
+	if (fcntl(client->fd, F_SETFD, FD_CLOEXEC) == -1) {
+		err = got_error_from_errno("fcntl");
+		goto done;
+	}
+
 	if (imsgbuf_init(&client->iev.ibuf, client->fd) == -1) {
 		err = got_error_from_errno("imsgbuf_init");
 		goto done;