Pass terminal data on socket on Cygwin platforms

On Cygwin and MSYS2 use a controlling pty for the server client handler
instead of passing a file descriptor over the socket which is not
possible on Cygwin platforms.

Attach an event to STDIN on the client, passing data from it to the
server and attach an event to the pty out_fd on the server client
handler and pass data from it to the client.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover
2024-07-25 21:55:40 +00:00
parent 8d6eb4be40
commit 80e6621298
6 changed files with 78 additions and 2 deletions

View File

@ -68,6 +68,11 @@ enum msgtype {
MSG_WRITE_READY,
MSG_WRITE_CLOSE,
MSG_READ_CANCEL
#ifdef TTY_OVER_SOCKET
,
MSG_TTY_READ,
MSG_TTY_WRITE
#endif
};
/*