tlsgate

TLS reverse proxy
git clone git://git.akobets.xyz/tlsgate
Log | Files | Refs | README | LICENSE

commit d2e8e8d2570583a210c5802214c4f0c35d7da2a1
parent 324cef4959401304739389e9a3fd87ba27ce25dd
Author: Artem Kobets <artem@akobets.xyz>
Date:   Fri, 11 Sep 2020 23:21:53 +0300

edit usage and -v messages

Diffstat:
Mmain.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/main.c b/main.c @@ -191,12 +191,14 @@ sigchld(int unused) static void usage(void) { - errx( + fprintf( + stderr, "usage: %s [-v] -c cert -k key [-C ca]\n" " [-h host] [-p port] [-H host] [-P port] [-U file]\n" - " [-n conn-num]", + " [-n conn-num]\n", argv0 ); + exit(1); } @@ -252,7 +254,8 @@ main(int argc, char **argv) maxconns = atol(optarg); break; case 'v': - errx("version %s", VERSION); + puts(VERSION); + exit(0); break; default: usage(); @@ -319,7 +322,6 @@ main(int argc, char **argv) switch (pid = fork()) { case 0: { - close(fd); serve(ctx, cfd, server_host, server_port, server_udsfile); _exit(0); }