Skip to content

Commit

Permalink
pty: rename pty_close to pty_kill
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Mar 6, 2021
1 parent f67feeb commit 02bbbec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/protocol.c
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/pty.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/pty.h
Expand Up @@ -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

0 comments on commit 02bbbec

Please sign in to comment.