diff --git a/src/exec.c b/src/exec.c index 95826f2..7d66172 100644 --- a/src/exec.c +++ b/src/exec.c @@ -610,8 +610,7 @@ struct hyper_exec *hyper_find_exec_by_seq(struct hyper_pod *pod, uint64_t seq) return NULL; } -int hyper_send_exec_eof(int to, struct hyper_pod *pod, - int pid, uint8_t code) +int hyper_handle_exec_exit(struct hyper_pod *pod, int pid, uint8_t code) { struct hyper_exec *exec; diff --git a/src/exec.h b/src/exec.h index 2da0dd8..56320ca 100644 --- a/src/exec.h +++ b/src/exec.h @@ -32,8 +32,7 @@ int hyper_setup_exec_tty(struct hyper_exec *e); int hyper_dup_exec_tty(int fd, struct hyper_exec *e); struct hyper_exec *hyper_find_exec_by_pid(struct list_head *head, int pid); struct hyper_exec *hyper_find_exec_by_seq(struct hyper_pod *pod, uint64_t seq); -int hyper_send_exec_eof(int to, struct hyper_pod *pod, - int pid, uint8_t code); +int hyper_handle_exec_exit(struct hyper_pod *pod, int pid, uint8_t code); int hyper_watch_exec_pty(struct hyper_exec *exec, struct hyper_pod *pod); void hyper_cleanup_exec(struct hyper_pod *pod); diff --git a/src/init.c b/src/init.c index 58c2ecb..738d787 100644 --- a/src/init.c +++ b/src/init.c @@ -198,7 +198,7 @@ static int hyper_handle_exit(struct hyper_pod *pod) pid, WTERMSIG(status)); } - if (pod && hyper_send_exec_eof(ctl.tty.fd, pod, pid, data[4]) < 0) + if (pod && hyper_handle_exec_exit(pod, pid, data[4]) < 0) fprintf(stderr, "signal_loop send eof failed\n"); }