mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00: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:
5
client.c
5
client.c
@ -328,8 +328,13 @@ client_send_identify(int flags)
|
||||
strlcpy(data.term, term, sizeof data.term) >= sizeof data.term)
|
||||
*data.term = '\0';
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
snprintf(&data.ttyname, sizeof data.ttyname, "%s",
|
||||
ttyname(STDIN_FILENO));
|
||||
#else
|
||||
if ((fd = dup(STDIN_FILENO)) == -1)
|
||||
fatal("dup failed");
|
||||
#endif
|
||||
imsg_compose(&client_ibuf,
|
||||
MSG_IDENTIFY, PROTOCOL_VERSION, -1, fd, &data, sizeof data);
|
||||
client_update_event();
|
||||
|
Reference in New Issue
Block a user