diff --git a/src/exec.c b/src/exec.c index c652b7c..b2323c5 100644 --- a/src/exec.c +++ b/src/exec.c @@ -413,7 +413,6 @@ static int hyper_install_process_stdio(struct hyper_exec *e) int ret = -1; fprintf(stdout, "%s\n", __func__); - setsid(); if (e->tty) { char ptmx[512]; @@ -557,6 +556,8 @@ static void hyper_exec_process(struct hyper_exec *exec) goto exit; } + setsid(); + if (hyper_install_process_stdio(exec) < 0) { fprintf(stderr, "dup pts to exec stdio failed\n"); goto exit;