On Sat, 05 Apr 2025 07:02:08 -0400
Andrew Schulman wrote:
> screen 5.0.0 now includes calls to TIOCCONS, like this:
>
> ioctl(consredirfd[1], TIOCCONS, (char *)&on)
>
> Since TIOCCONS seems not to be present in Cygwin, can someone please suggest
> what the equivalent would be?
There is not default console on cygwin such as /dev/tty0 or /dev/console
on Linux. cygwin has /dev/console but it is an alias of current console
device such as /dev/cons0.
So we cannot implement TIOCCONS in cygwin.
What about commenting out the body of TtyGrabConsole() like:
--- origsrc/screen-5.0.0/tty.c 2024-08-29 04:55:03.000000000 +0900
+++ src/screen-5.0.0/tty.c 2025-04-06 00:57:11.489640800 +0900
@@ -802,6 +802,7 @@ static void consredir_readev_fn(Event *
int TtyGrabConsole(int fd, bool on, char *rc_name)
{
+#ifndef __CYGWIN__
Display *d;
#ifdef SRIOCSREDIR
int cfd;
@@ -880,6 +881,7 @@ int TtyGrabConsole(int fd, bool on, char
consredir_ev.type = EV_READ;
consredir_ev.handler = consredir_readev_fn;
evenq(&consredir_ev);
+#endif
return 0;
}
?
Does something behaves wrong with that?
--
Takashi Yano <[email protected]>