From 02bbbec678c9eb32b3b67bca71a79099f92c63a5 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Sat, 6 Mar 2021 17:39:05 +0800 Subject: [PATCH] pty: rename pty_close to pty_kill --- src/protocol.c | 2 +- src/pty.c | 2 +- src/pty.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/protocol.c b/src/protocol.c index 02eb95d..c2eb016 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -326,7 +326,7 @@ int callback_tty(struct lws *wsi, enum lws_callback_reasons reason, void *user, if (process_running(pss->process)) { pty_pause(pss->process); lwsl_notice("killing process, pid: %d\n", pss->process->pid); - pty_close(pss->process, server->sig_code); + pty_kill(pss->process, server->sig_code); } if (server->once && server->client_count == 0) { diff --git a/src/pty.c b/src/pty.c index 9c87b1b..b15c76d 100644 --- a/src/pty.c +++ b/src/pty.c @@ -151,7 +151,7 @@ bool pty_resize(pty_process *process) { #endif } -bool pty_close(pty_process *process, int sig) { +bool pty_kill(pty_process *process, int sig) { process->killed = true; #ifdef _WIN32 return TerminateProcess(process->handle, 1) != 0; diff --git a/src/pty.h b/src/pty.h index 918c452..6b2d738 100644 --- a/src/pty.h +++ b/src/pty.h @@ -68,6 +68,6 @@ void pty_pause(pty_process *process); void pty_resume(pty_process *process); int pty_write(pty_process *process, pty_buf_t *buf); bool pty_resize(pty_process *process); -bool pty_close(pty_process *process, int sig); +bool pty_kill(pty_process *process, int sig); #endif // TTYD_PTY_H -- 2.43.4