teed, branch HEADA multiplex relay tee(1) daemon.
b4557ee073c95763d043d6819dda62ce21b45a372023-08-14T15:25:34Z2023-08-14T15:25:34ZAdd LICENSE information link in teed.cChristoph Lohmann20h@r-36.netcommit 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
108ea8962d23bdccac4e5cfd60dc179a1cea300a2023-08-14T13:10:09Z2023-08-14T14:58:55Zonly set dlen if data is non-NULLHiltjo Posthumahiltjo@codemadness.orgcommit 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>
81543713efc69529db9bbcbd90e0b16a4481a45f2023-08-14T13:09:45Z2023-08-14T14:58:55Zfree the current element, else one element was missedHiltjo Posthumahiltjo@codemadness.orgcommit 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>
2a6e3d8d898be6ab1a5ac16b3d288ddef0bc30892023-08-14T13:09:23Z2023-08-14T14:58:55Zfree data (order was wrong) and no need to check for free(NULL)Hiltjo Posthumahiltjo@codemadness.orgcommit 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>
7ea6a417f78562629bd6f579dd593d44a5372acb2023-08-14T13:09:01Z2023-08-14T14:58:55Zhandle SIGINT and SIGTERM: cleanup on these signalsHiltjo Posthumahiltjo@codemadness.orgcommit 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>
c9671740957f58aa168262f3e76ad2f72542f05b2023-08-14T12:23:53Z2023-08-14T14:58:55Zclose sockets/fds on disconnect and prevent fd leaksHiltjo Posthumahiltjo@codemadness.orgcommit 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>
22ed6e7883ecd3f6e3ade985a0963604ba800ade2023-08-14T12:22:40Z2023-08-14T14:58:55Zremove a premature optimizationHiltjo Posthumahiltjo@codemadness.orgcommit 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>
b5674ba2b8612d190d7f61ed4816f56f7e1e93812023-08-14T12:22:26Z2023-08-14T14:58:55Zprint error if creating a socket() failedHiltjo Posthumahiltjo@codemadness.orgcommit 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>
8d1db0f43e921b998a06dd61d1442220db29ee892023-08-14T12:22:16Z2023-08-14T14:58:55Zpselect: set a timeout of 1 secondHiltjo Posthumahiltjo@codemadness.orgcommit 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>
18db7808b4a41155537b83db1294720403990b4c2023-08-14T12:20:34Z2023-08-14T14:58:55Zmemdup: use memcpyHiltjo Posthumahiltjo@codemadness.orgcommit 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>
66db6db25fc61d5f44642b2558b9f9b1dcffdab22023-08-14T12:19:52Z2023-08-14T14:58:55Zadd initial man pageHiltjo Posthumahiltjo@codemadness.orgcommit 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>
acaa427d4d4fa8e8ce6e626e94ec922d50316ee72023-08-12T18:27:55Z2023-08-12T18:34:38Zremove unused variables and unneeded includeHiltjo Posthumahiltjo@codemadness.orgcommit 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>
b79b790fed08bd18a0979c5d94f039dd64d55f5a2023-08-07T13:19:59Z2023-08-07T13:19:59ZFix chmod for all paths. Thanks pazz0!Christoph Lohmann20h@r-36.netcommit 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!
8e004a8b16297a78bb32562bf3c3f93dae632a792023-08-07T10:14:23Z2023-08-07T10:14:23ZMake the cany a can.Christoph Lohmann20h@r-36.netcommit 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!
e58c0a5292801fc56ee598a7e60e311593550e4b2023-08-07T10:12:48Z2023-08-07T10:12:48ZAdd makefile.Christoph Lohmann20h@r-36.netcommit e58c0a5292801fc56ee598a7e60e311593550e4b
parent f2f794584857bf0d32fb7c154bb7ef89893aa11c
Author: Christoph Lohmann <20h@r-36.net>
Date: Mon, 7 Aug 2023 12:12:48 +0200
Add makefile.
f2f794584857bf0d32fb7c154bb7ef89893aa11c2023-08-07T10:09:47Z2023-08-07T10:09:47ZInitial commit of teed.Christoph Lohmann20h@r-36.netcommit f2f794584857bf0d32fb7c154bb7ef89893aa11c
Author: Christoph Lohmann <20h@r-36.net>
Date: Mon, 7 Aug 2023 12:09:47 +0200
Initial commit of teed.