teed, branch HEAD A multiplex relay tee(1) daemon. b4557ee073c95763d043d6819dda62ce21b45a37 2023-08-14T15:25:34Z 2023-08-14T15:25:34Z Add LICENSE information link in teed.c Christoph Lohmann 20h@r-36.net commit b4557ee073c95763d043d6819dda62ce21b45a37 parent 108ea8962d23bdccac4e5cfd60dc179a1cea300a Author: Christoph Lohmann <20h@r-36.net> Date: Mon, 14 Aug 2023 17:25:34 +0200 Add LICENSE information link in teed.c 108ea8962d23bdccac4e5cfd60dc179a1cea300a 2023-08-14T13:10:09Z 2023-08-14T14:58:55Z only set dlen if data is non-NULL Hiltjo Posthuma hiltjo@codemadness.org commit 108ea8962d23bdccac4e5cfd60dc179a1cea300a parent 81543713efc69529db9bbcbd90e0b16a4481a45f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 15:10:09 +0200 only set dlen if data is non-NULL Signed-off-by: Christoph Lohmann <20h@r-36.net> 81543713efc69529db9bbcbd90e0b16a4481a45f 2023-08-14T13:09:45Z 2023-08-14T14:58:55Z free the current element, else one element was missed Hiltjo Posthuma hiltjo@codemadness.org commit 81543713efc69529db9bbcbd90e0b16a4481a45f parent 2a6e3d8d898be6ab1a5ac16b3d288ddef0bc3089 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 15:09:45 +0200 free the current element, else one element was missed Signed-off-by: Christoph Lohmann <20h@r-36.net> 2a6e3d8d898be6ab1a5ac16b3d288ddef0bc3089 2023-08-14T13:09:23Z 2023-08-14T14:58:55Z free data (order was wrong) and no need to check for free(NULL) Hiltjo Posthuma hiltjo@codemadness.org commit 2a6e3d8d898be6ab1a5ac16b3d288ddef0bc3089 parent 7ea6a417f78562629bd6f579dd593d44a5372acb Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 15:09:23 +0200 free data (order was wrong) and no need to check for free(NULL) Signed-off-by: Christoph Lohmann <20h@r-36.net> 7ea6a417f78562629bd6f579dd593d44a5372acb 2023-08-14T13:09:01Z 2023-08-14T14:58:55Z handle SIGINT and SIGTERM: cleanup on these signals Hiltjo Posthuma hiltjo@codemadness.org commit 7ea6a417f78562629bd6f579dd593d44a5372acb parent c9671740957f58aa168262f3e76ad2f72542f05b Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 15:09:01 +0200 handle SIGINT and SIGTERM: cleanup on these signals Signed-off-by: Christoph Lohmann <20h@r-36.net> c9671740957f58aa168262f3e76ad2f72542f05b 2023-08-14T12:23:53Z 2023-08-14T14:58:55Z close sockets/fds on disconnect and prevent fd leaks Hiltjo Posthuma hiltjo@codemadness.org commit c9671740957f58aa168262f3e76ad2f72542f05b parent 22ed6e7883ecd3f6e3ade985a0963604ba800ade Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 14:23:53 +0200 close sockets/fds on disconnect and prevent fd leaks Signed-off-by: Christoph Lohmann <20h@r-36.net> 22ed6e7883ecd3f6e3ade985a0963604ba800ade 2023-08-14T12:22:40Z 2023-08-14T14:58:55Z remove a premature optimization Hiltjo Posthuma hiltjo@codemadness.org commit 22ed6e7883ecd3f6e3ade985a0963604ba800ade parent b5674ba2b8612d190d7f61ed4816f56f7e1e9381 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 14:22:40 +0200 remove a premature optimization The loop below already checks the linked-list head pointer. Signed-off-by: Christoph Lohmann <20h@r-36.net> b5674ba2b8612d190d7f61ed4816f56f7e1e9381 2023-08-14T12:22:26Z 2023-08-14T14:58:55Z print error if creating a socket() failed Hiltjo Posthuma hiltjo@codemadness.org commit b5674ba2b8612d190d7f61ed4816f56f7e1e9381 parent 8d1db0f43e921b998a06dd61d1442220db29ee89 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 14:22:26 +0200 print error if creating a socket() failed Signed-off-by: Christoph Lohmann <20h@r-36.net> 8d1db0f43e921b998a06dd61d1442220db29ee89 2023-08-14T12:22:16Z 2023-08-14T14:58:55Z pselect: set a timeout of 1 second Hiltjo Posthuma hiltjo@codemadness.org commit 8d1db0f43e921b998a06dd61d1442220db29ee89 parent 18db7808b4a41155537b83db1294720403990b4c Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 14:22:16 +0200 pselect: set a timeout of 1 second This is for sockets that are closed. These are signalled by FD_ISSET and a read() that returns 0. This way it can handle them directly when it occurs vs on the next read of a socket. Signed-off-by: Christoph Lohmann <20h@r-36.net> 18db7808b4a41155537b83db1294720403990b4c 2023-08-14T12:20:34Z 2023-08-14T14:58:55Z memdup: use memcpy Hiltjo Posthuma hiltjo@codemadness.org commit 18db7808b4a41155537b83db1294720403990b4c parent 66db6db25fc61d5f44642b2558b9f9b1dcffdab2 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 14:20:34 +0200 memdup: use memcpy No memmove needed, because allocated memory cannot overlap. Signed-off-by: Christoph Lohmann <20h@r-36.net> 66db6db25fc61d5f44642b2558b9f9b1dcffdab2 2023-08-14T12:19:52Z 2023-08-14T14:58:55Z add initial man page Hiltjo Posthuma hiltjo@codemadness.org commit 66db6db25fc61d5f44642b2558b9f9b1dcffdab2 parent acaa427d4d4fa8e8ce6e626e94ec922d50316ee7 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 14:19:52 +0200 add initial man page Signed-off-by: Christoph Lohmann <20h@r-36.net> acaa427d4d4fa8e8ce6e626e94ec922d50316ee7 2023-08-12T18:27:55Z 2023-08-12T18:34:38Z remove unused variables and unneeded include Hiltjo Posthuma hiltjo@codemadness.org commit acaa427d4d4fa8e8ce6e626e94ec922d50316ee7 parent b79b790fed08bd18a0979c5d94f039dd64d55f5a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 12 Aug 2023 20:27:55 +0200 remove unused variables and unneeded include Signed-off-by: Christoph Lohmann <20h@r-36.net> b79b790fed08bd18a0979c5d94f039dd64d55f5a 2023-08-07T13:19:59Z 2023-08-07T13:19:59Z Fix chmod for all paths. Thanks pazz0! Christoph Lohmann 20h@r-36.net commit b79b790fed08bd18a0979c5d94f039dd64d55f5a parent 8e004a8b16297a78bb32562bf3c3f93dae632a79 Author: Christoph Lohmann <20h@r-36.net> Date: Mon, 7 Aug 2023 15:19:59 +0200 Fix chmod for all paths. Thanks pazz0! 8e004a8b16297a78bb32562bf3c3f93dae632a79 2023-08-07T10:14:23Z 2023-08-07T10:14:23Z Make the cany a can. Christoph Lohmann 20h@r-36.net commit 8e004a8b16297a78bb32562bf3c3f93dae632a79 parent e58c0a5292801fc56ee598a7e60e311593550e4b Author: Christoph Lohmann <20h@r-36.net> Date: Mon, 7 Aug 2023 12:14:23 +0200 Make the cany a can. Thanks quinq! e58c0a5292801fc56ee598a7e60e311593550e4b 2023-08-07T10:12:48Z 2023-08-07T10:12:48Z Add makefile. Christoph Lohmann 20h@r-36.net commit e58c0a5292801fc56ee598a7e60e311593550e4b parent f2f794584857bf0d32fb7c154bb7ef89893aa11c Author: Christoph Lohmann <20h@r-36.net> Date: Mon, 7 Aug 2023 12:12:48 +0200 Add makefile. f2f794584857bf0d32fb7c154bb7ef89893aa11c 2023-08-07T10:09:47Z 2023-08-07T10:09:47Z Initial commit of teed. Christoph Lohmann 20h@r-36.net commit f2f794584857bf0d32fb7c154bb7ef89893aa11c Author: Christoph Lohmann <20h@r-36.net> Date: Mon, 7 Aug 2023 12:09:47 +0200 Initial commit of teed.