SMOLNET PORTAL home about changes
iclose sockets/fds on disconnect and prevent fd leaks - teed - A multiplex relay tee(1) daemon.	Err	bitreich.org	70
hgit clone git://bitreich.org/teed git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/teed	URL:git://bitreich.org/teed git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/teed	bitreich.org	70
1Log	/scm/teed/log.gph	bitreich.org	70
1Files	/scm/teed/files.gph	bitreich.org	70
1Refs	/scm/teed/refs.gph	bitreich.org	70
1Tags	/scm/teed/tag	bitreich.org	70
1README	/scm/teed/file/README.md.gph	bitreich.org	70
1LICENSE	/scm/teed/file/LICENSE.gph	bitreich.org	70
i---	Err	bitreich.org	70
1commit c9671740957f58aa168262f3e76ad2f72542f05b	/scm/teed/commit/c9671740957f58aa168262f3e76ad2f72542f05b.gph	bitreich.org	70
1parent 22ed6e7883ecd3f6e3ade985a0963604ba800ade	/scm/teed/commit/22ed6e7883ecd3f6e3ade985a0963604ba800ade.gph	bitreich.org	70
hAuthor: Hiltjo Posthuma <hiltjo@codemadness.org>	URL:mailto:hiltjo@codemadness.org	bitreich.org	70
iDate:   Mon, 14 Aug 2023 14:23:53 +0200	Err	bitreich.org	70
i	Err	bitreich.org	70
iclose sockets/fds on disconnect and prevent fd leaks	Err	bitreich.org	70
i	Err	bitreich.org	70
iSigned-off-by: Christoph Lohmann <20h@r-36.net>	Err	bitreich.org	70
i	Err	bitreich.org	70
iDiffstat:	Err	bitreich.org	70
i  M teed.c                              |       2 ++	Err	bitreich.org	70
i	Err	bitreich.org	70
i1 file changed, 2 insertions(+), 0 deletions(-)	Err	bitreich.org	70
i---	Err	bitreich.org	70
1diff --git a/teed.c b/teed.c	/scm/teed/file/teed.c.gph	bitreich.org	70
i@@ -265,6 +265,7 @@ main(int argc, char *argv[])	Err	bitreich.org	70
i                                 recvl = read(*(int *)e->data, recvbuf,	Err	bitreich.org	70
i                                                 sizeof(recvbuf));	Err	bitreich.org	70
i                                 if (recvl <= 0) {	Err	bitreich.org	70
i+                                        close(*(int *)e->data);	Err	bitreich.org	70
i                                         e = llist_del(&rfds, e);	Err	bitreich.org	70
i                                         if (e == NULL)	Err	bitreich.org	70
i                                                 break;	Err	bitreich.org	70
i@@ -275,6 +276,7 @@ main(int argc, char *argv[])	Err	bitreich.org	70
i                                         sendl = recvl;	Err	bitreich.org	70
i                                         while (sendl > 0) {	Err	bitreich.org	70
i                                                 if ((sent = write(*(int *)qe->data, sendbufi, sendl)) < 0) {	Err	bitreich.org	70
i+                                                        close(*(int *)qe->data);	Err	bitreich.org	70
i                                                         qe = llist_del(&wfds, qe);	Err	bitreich.org	70
i                                                         break;	Err	bitreich.org	70
i                                                 }	Err	bitreich.org	70
.
Response: text/plain
Original URLgopher://bitreich.org/0/scm/teed/commit/c9671740957f58aa1...
Content-Typetext/plain; charset=utf-8