diff --git a/src/init.c b/src/init.c index ee895c4..d1cbe1a 100644 --- a/src/init.c +++ b/src/init.c @@ -41,7 +41,6 @@ struct hyper_ctl ctl; sigset_t orig_mask; static int hyper_handle_exit(struct hyper_pod *pod); -static int hyper_stop_pod(struct hyper_pod *pod); static int hyper_set_win_size(char *json, int length) { @@ -935,20 +934,6 @@ void hyper_cleanup_pod(struct hyper_pod *pod) hyper_cleanup_hostname(pod); } -static int hyper_stop_pod(struct hyper_pod *pod) -{ - fprintf(stdout, "hyper_stop_pod init_pid %d\n", pod->init_pid); - if (pod->init_pid == 0) { - fprintf(stdout, "container init pid is already exit\n"); - hyper_send_type(ctl.chan.fd, ACK); - return 0; - } - - pod->init_pid = 0; - hyper_term_all(pod); - return 0; -} - static int hyper_setup_ctl_channel(char *name) { int ret = hyper_open_channel(name, 0); @@ -1082,9 +1067,9 @@ static int hyper_channel_handle(struct hyper_event *de, uint32_t len) hyper_print_uptime(); break; case STOPPOD: - hyper_stop_pod(pod); - return 0; - //break; + fprintf(stderr, "get abandoned STOPPOD message\n"); + ret = -1; + break; case DESTROYPOD: fprintf(stdout, "get DESTROYPOD message\n"); hyper_destroy_pod(pod, 0);