mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-27 02:23:15 +01:00
Sync OpenBSD patchset 201:
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
1650b8552f
commit
817e93ac94
6
client.c
6
client.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: client.c,v 1.57 2009-07-28 22:12:16 tcunha Exp $ */
|
/* $Id: client.c,v 1.58 2009-07-30 20:50:10 tcunha Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -147,7 +147,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…
Reference in New Issue
Block a user