diff options
author | Markos Fountoulakis <44345837+mfundul@users.noreply.github.com> | 2020-05-11 18:42:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 18:42:19 +0300 |
commit | 9e8a0e173e2f4402fb081950b4b25d5fc0b62492 (patch) | |
tree | 017719a3d0d34f7a42142d1f6acb6a52b02afc50 /daemon | |
parent | 30597a5bd4e9a90ef200d18e78e3fbb8a0c49d9f (diff) |
Fix shutdown via netdatacli with musl C library (#8931)
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/commands.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/commands.c b/daemon/commands.c index bf9c30d124..3f4df4bd9f 100644 --- a/daemon/commands.c +++ b/daemon/commands.c @@ -449,6 +449,10 @@ static void parse_commands(struct command_context *cmd_ctx) for (pos = cmd_ctx->command_string ; isspace(*pos) && ('\0' != *pos) ; ++pos) {;} for (i = 0 ; i < CMD_TOTAL_COMMANDS ; ++i) { if (!strncmp(pos, command_info_array[i].cmd_str, strlen(command_info_array[i].cmd_str))) { + if (CMD_EXIT == i) { + /* musl C does not like libuv workqueues calling exit() */ + execute_command(CMD_EXIT, NULL, NULL); + } for (lstrip=pos + strlen(command_info_array[i].cmd_str); isspace(*lstrip) && ('\0' != *lstrip); ++lstrip) {;} for (rstrip=lstrip+strlen(lstrip)-1; rstrip>lstrip && isspace(*rstrip); *(rstrip--) = 0 ); |