summaryrefslogtreecommitdiff
path: root/src/tools/operf
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/operf')
-rw-r--r--src/tools/operf/operf.c2
-rw-r--r--src/tools/operf/operf_client.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/operf/operf.c b/src/tools/operf/operf.c
index 1872b351..0198e871 100644
--- a/src/tools/operf/operf.c
+++ b/src/tools/operf/operf.c
@@ -248,5 +248,5 @@ int main(int argc, char ** argv)
if (ret < 0)
exit(EXIT_FAILURE);
- exit(EXIT_SUCCESS);
+ exit(ret);
}
diff --git a/src/tools/operf/operf_client.c b/src/tools/operf/operf_client.c
index 7e8f1a9b..e478aeff 100644
--- a/src/tools/operf/operf_client.c
+++ b/src/tools/operf/operf_client.c
@@ -185,7 +185,7 @@ int client_main(void)
sigaction(SIGHUP, &sig_act, NULL) ||
sigaction(SIGPIPE, &sig_act, NULL)) {
printf("Failed to install sighandler.\n");
- return -1;
+ return 2;
}
client.sent = 0;
@@ -196,7 +196,7 @@ int client_main(void)
fd = flow_alloc(client.server_name, NULL, NULL);
if (fd < 0) {
printf("Failed to allocate flow.\n");
- return -1;
+ return 2;
}
if (client.conf.test_type == TEST_TYPE_BI)
@@ -207,7 +207,7 @@ int client_main(void)
if (flow_write(fd, &client.conf, sizeof(client.conf)) < 0) {
printf("Failed to send configuration.\n");
flow_dealloc(fd);
- return -1;
+ return 1;
}
sleep(1);