mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-14 07:49:01 +02:00
Add support for Cgywin, apparently it is enough just to open the tty again in
the server and fd passing is not necessary. Needs some ifdefs unfortunately but no way around that and some of them can go next time we're willing to do a protocol bump. Patch from J Raynor jxraynor at gmail dot com.
This commit is contained in:
@ -825,9 +825,12 @@ server_client_msg_dispatch(struct client *c)
|
||||
case MSG_IDENTIFY:
|
||||
if (datalen != sizeof identifydata)
|
||||
fatalx("bad MSG_IDENTIFY size");
|
||||
memcpy(&identifydata, imsg.data, sizeof identifydata);
|
||||
#ifdef __CYGWIN__
|
||||
imsg.fd = open(identifydata.ttyname, O_RDWR|O_NOCTTY);
|
||||
#endif
|
||||
if (imsg.fd == -1)
|
||||
fatalx("MSG_IDENTIFY missing fd");
|
||||
memcpy(&identifydata, imsg.data, sizeof identifydata);
|
||||
|
||||
server_client_msg_identify(c, &identifydata, imsg.fd);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user