diff options
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -93,7 +93,7 @@ server_delete_by_name(struct cfg *cfg, const char *name) { struct server *scfg; - if (!cfg || !name || name[0] == '\0') + if (!cfg || empty_str(name)) return; list_for_each_entry(scfg, &cfg->servers, list) { @@ -247,7 +247,9 @@ exec_cmd(struct cfg *cfg, struct server *scfg, const char *cmd) } } while (!WIFEXITED(wstatus)); - fprintf(stderr, "Child %s exited: %i\n", scfg->start_exec, WEXITSTATUS(wstatus)); + fprintf(stderr, "Child %s exited: %i\n", scfg->start_exec, + WEXITSTATUS(wstatus)); + if (WEXITSTATUS(wstatus) == 0) return true; else |