diff --git a/src/exec.c b/src/exec.c index 20c04e1..2e62cd1 100644 --- a/src/exec.c +++ b/src/exec.c @@ -656,7 +656,7 @@ int hyper_exec_cmd(char *json, int length) .exec = NULL, .pipe = {-1, -1}, }; - int pid, ret = -1, status; + int pid, ret = -1; uint32_t type; fprintf(stdout, "call hyper_exec_cmd, json %s, len %d\n", json, length); @@ -698,11 +698,6 @@ int hyper_exec_cmd(char *json, int length) goto close_tty; } - if (waitpid(pid, &status, __WCLONE) <= 0) { - perror("waiting hyper_do_exec_cmd finish failed"); - goto close_tty; - } - if (hyper_get_type(arg.pipe[0], &type) < 0 || (int)type < 0) { fprintf(stderr, "hyper init doesn't get execcmd ready message\n"); goto close_tty;