Re: [regression] ENOTTY returned for tty fds

stsp
2024-07-24T08:07:35Z

24.07.2024 09:51, Greg KH пишет:
> What caused this change/regression?

I have absolutely no idea.
I've found it by debugging userspace,
and wrote a test-case to make sure the
problem is not in user-space.

> And does any real-world programs
> rely on this?

dosemu

> What exactly are you trying to determine with this ioctl
> test?

Whether it is a PTS (Pseudo-Tty-Slave), or
a real comport with MSR signalling.

> Is there a different way to determine that?
I am not aware of any "canonical" way
of determining this. Maybe you tell me. :)
So far the only fix I know, is to stop checking
errno. But you return ENOTTY for a tty-associated
fd (isatty(fd)==1), so I believe this is a
bug in a kernel.