mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Tell the server when the client gets SIGTERM so it can clean up the terminal
properly, rather than just exiting.
This commit is contained in:
parent
071494d8fa
commit
479d614884
4
client.c
4
client.c
@ -143,7 +143,9 @@ client_main(struct client_ctx *cctx)
|
|||||||
|
|
||||||
logfile("client");
|
logfile("client");
|
||||||
|
|
||||||
while (!sigterm) {
|
for (;;) {
|
||||||
|
if (sigterm)
|
||||||
|
client_write_server(cctx, MSG_EXITING, NULL, 0);
|
||||||
if (sigchld) {
|
if (sigchld) {
|
||||||
waitpid(WAIT_ANY, NULL, WNOHANG);
|
waitpid(WAIT_ANY, NULL, WNOHANG);
|
||||||
sigchld = 0;
|
sigchld = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user