[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024072401-spearfish-gnarly-a09e@gregkh>
Date: Wed, 24 Jul 2024 11:08:34 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: stsp <stsp2@...dex.ru>
Cc: linux-serial@...r.kernel.org,
Linux kernel <linux-kernel@...r.kernel.org>
Subject: Re: [regression] ENOTTY returned for tty fds
On Wed, Jul 24, 2024 at 11:07:32AM +0300, stsp wrote:
> 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.
So this has always worked this way? Or has it changed? If changed,
when did it work before?
> > And does any real-world programs
> > rely on this?
>
> dosemu
It does this today or wants to do this in the future?
> > 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.
Why is that needed? And why not do it how other programs (like stty)
does it?
> > 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.
isatty() is a libc provided function, not a kernel call.
thanks,
greg k-h
Powered by blists - more mailing lists