diff options
author | Sander Vrijders <[email protected]> | 2016-08-08 10:29:06 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2016-08-08 10:29:06 +0200 |
commit | c1e1831ded0330771fd175f1c8138ed82c90f9f8 (patch) | |
tree | 617e3002ffa5addb364c01d5cd925d8c609b12b5 /src/tools/oping/oping_server.c | |
parent | d5b71449bc18116444720257ba640e3c597ff6e9 (diff) | |
parent | 8450af0e2950e5a1415e38702d6169cc8a732294 (diff) | |
download | ouroboros-c1e1831ded0330771fd175f1c8138ed82c90f9f8.tar.gz ouroboros-c1e1831ded0330771fd175f1c8138ed82c90f9f8.zip |
Merged in dstaesse/ouroboros/be-bugfixing (pull request #187)
bugfixes
Diffstat (limited to 'src/tools/oping/oping_server.c')
-rw-r--r-- | src/tools/oping/oping_server.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c index eb0b511b..a5021cba 100644 --- a/src/tools/oping/oping_server.c +++ b/src/tools/oping/oping_server.c @@ -37,9 +37,7 @@ void shutdown_server(int signo, siginfo_t * info, void * c) case SIGINT: case SIGTERM: case SIGHUP: - pthread_cancel(server.server_pt); pthread_cancel(server.accept_pt); - pthread_cancel(server.cleaner_pt); default: return; } @@ -154,8 +152,12 @@ int server_main() pthread_create(&server.accept_pt, NULL, accept_thread, NULL); pthread_create(&server.server_pt, NULL, server_thread, NULL); - pthread_join(server.server_pt, NULL); pthread_join(server.accept_pt, NULL); + + pthread_cancel(server.server_pt); + pthread_cancel(server.cleaner_pt); + + pthread_join(server.server_pt, NULL); pthread_join(server.cleaner_pt, NULL); return 0; |