summaryrefslogtreecommitdiff
path: root/src/tools/ocbr/ocbr_client.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-05-01 15:30:40 +0200
committerSander Vrijders <sander@ouroboros.rocks>2026-05-20 08:17:04 +0200
commit3be3360349ee823531d6c3e53b188a7e8af2b761 (patch)
tree733730ec06017c753eabc1d552fe31fe2bbf24f3 /src/tools/ocbr/ocbr_client.c
parente05bd477e73b9a5d533c4865022602dc60cec1ab (diff)
downloadouroboros-3be3360349ee823531d6c3e53b188a7e8af2b761.tar.gz
ouroboros-3be3360349ee823531d6c3e53b188a7e8af2b761.zip
tools: Use distinct exit codes
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 <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/tools/ocbr/ocbr_client.c')
-rw-r--r--src/tools/ocbr/ocbr_client.c4
1 files changed, 2 insertions, 2 deletions
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);