From 3be3360349ee823531d6c3e53b188a7e8af2b761 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Fri, 1 May 2026 15:30:40 +0200 Subject: tools: Use distinct exit codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tools will now use the following convention: 0 — success 1 — runtime/I/O failure or packet loss 2 — setup failure oping now uses a SIGALRM to exit on duration tests. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/tools/ocbr/ocbr_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools/ocbr/ocbr_client.c') diff --git a/src/tools/ocbr/ocbr_client.c b/src/tools/ocbr/ocbr_client.c index 9dd9904c..3da3beb7 100644 --- a/src/tools/ocbr/ocbr_client.c +++ b/src/tools/ocbr/ocbr_client.c @@ -98,7 +98,7 @@ int client_main(char * server, sigaction(SIGHUP, &sig_act, NULL) || sigaction(SIGPIPE, &sig_act, NULL)) { printf("Failed to install sighandler.\n"); - return -1; + return 2; } printf("Client started, duration %d, rate %lu b/s, size %d B.\n", @@ -107,7 +107,7 @@ int client_main(char * server, fd = flow_alloc(server, NULL, NULL); if (fd < 0) { printf("Failed to allocate flow.\n"); - return -1; + return 2; } clock_gettime(CLOCK_REALTIME, &start); -- cgit v1.2.3