Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150131173338.GC23507@brightrain.aerifal.cx>
Date: Sat, 31 Jan 2015 12:33:38 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: isatty false positives and device state clobbering

On Fri, Jan 30, 2015 at 11:01:21PM -0500, Rich Felker wrote:
> Fortunately, TIOCGWINSZ, FIONREAD, and TIOCOUTQ also _seem_ to avoid
> clashes (although mips has some wacky numbering for them that would
> probably warrant further checks -- use of 'F' and 't' ioctl classes
> instead of 'T') so it's probably a matter of checking that these are
> supported on other systems we might care about (BSD Linux emulation?)
> and picking one.

On further thought, it seems plausible that someone might want to
implement FIONREAD/TIOCOUTQ for non-tty devices that have input or
output queues, so relying on them failing for non-tty devices seems
wrong. On the other hand, "window size" seems unlikely to be
reasonable for anything but a tty. So I think TIOCGWINSZ is the best
candidate so far. Any other ideas?

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.