pty: rename pty_close to pty_kill

This commit is contained in:
Shuanglei Tao
2021-03-06 17:39:05 +08:00
parent f67feebcc2
commit 02bbbec678
3 changed files with 3 additions and 3 deletions

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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