@cryptotaxi247 / netdata-1 / commits / dacd6b9b1

Fix libuv IPC pipe cleanup problem (#7778)

* Fix libuv IPC pipe cleanup problem

Markos Fountoulakis committed Jan 17, 2020 at 17:20 UTC dacd6b9b11ecf3f843121be743b81967d3533072
2 files changed +4 -2
daemon/commands.c
+3 -2
@@ -526,7 +526,7 @@ static void command_thread(void *arg)
526 info("Shutting down command event loop.");
527 uv_close((uv_handle_t *)&async, NULL);
528 uv_close((uv_handle_t*)&server_pipe, NULL);
529 - uv_run(loop, UV_RUN_DEFAULT);
529 + uv_run(loop, UV_RUN_DEFAULT); /* flush all libuv handles */
530
531 info("Shutting down command loop complete.");
532 assert(0 == uv_loop_close(loop));
@@ -540,6 +540,7 @@ error_after_pipe_bind:
540 error_after_pipe_init:
541 uv_close((uv_handle_t *)&async, NULL);
542 error_after_async_init:
543 + uv_run(loop, UV_RUN_DEFAULT); /* flush all libuv handles */
544 assert(0 == uv_loop_close(loop));
545 error_after_loop_init:
546 freez(loop);
@@ -587,7 +588,7 @@ void commands_init(void)
588 return;
589
590 after_error:
590 - error("Failed to initialize command server.");
591 + error("Failed to initialize command server. The netdata cli tool will be unable to send commands.");
592 }
593
594 void commands_exit(void)
packaging/installer/netdata-uninstaller.sh
+1
@@ -376,6 +376,7 @@ if [ -n "${NETDATA_PREFIX}" ] && [ -d "${NETDATA_PREFIX}" ]; then
376 else
377 rm_file "/usr/sbin/netdata"
378 rm_file "/usr/sbin/netdatacli"
379 + rm_file "/tmp/netdata-ipc"
380 rm_file "/usr/sbin/netdata-claim.sh"
381 rm_dir "/usr/share/netdata"
382 rm_dir "/usr/libexec/netdata"