From b58e8bfe04f4f8bcbb18dd6cb7c01f4d44b1f9ec Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 29 Apr 2023 22:14:41 +0200 Subject: cmd_line: read executable name from /proc/self/exe --- src/worker_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/worker_main.c') diff --git a/src/worker_main.c b/src/worker_main.c index 9e9a0b9..540eea1 100644 --- a/src/worker_main.c +++ b/src/worker_main.c @@ -40,7 +40,7 @@ static int parse_settings(struct settings *settings, int argc, char *argv[]) while ((opt = getopt_long(argc, argv, "hVH:p:", long_options, &longind)) != -1) { switch (opt) { case 'h': - exit_with_usage(0, argv[0]); + exit_with_usage(0); break; case 'V': exit_with_version(); @@ -52,7 +52,7 @@ static int parse_settings(struct settings *settings, int argc, char *argv[]) settings->port = optarg; break; default: - exit_with_usage(1, argv[0]); + exit_with_usage(1); break; } } -- cgit v1.2.3