Nathaniel J. Smith
Nathaniel J. Smith
DJB has some commentary on how properly written kernels should do things, which is completely correct and yet useless in practice, alas: https://cr.yp.to/unix/nonblock.html
I guess this is some kind of argument for... something: https://gist.github.com/njsmith/235d0355f0e3d647beb858765c5b63b3 (It exploits the fact that `setuid(getuid())` is a no-op *except* that [limitations of the Linux syscall interface](https://ewontfix.com/17/) mean that...
Here's the discussion about this in mio: https://github.com/carllerche/mio/issues/321 It looks like libuv has an amazing thing where their tty layer on windows actually implements a vt100 emulator in-process on top...
The console changes are great, but unfortunately, as far as I know none of them change the basic api that apps use to talk to their stdin/stdout when it's a...
More discoveries: * The discussion above concluded that on Windows 7, if you want to cancel a synchronous console read, then `CancelSynchronousIo` doesn't work. However, on Win 7, there is...
TODO: check how usable the above would be for python-prompt-toolkit / urwid
Allegedly Win7 is EOL on January 14, 2020. (I guess all things named "7" go EOL at the same time?) So maybe we don't need to care about it very...
> Cancelling a console read is clunky, unfortunately. The console host (conhost.exe) doesn't cancel the cooked read when the request is cancelled. At best, the line gets discarded when the...
...Oh wait, and you're actually saying that if you want cooked mode, and cancellation, then *even on Win 10* you're doomed to implement your own cooked mode from scratch.
On Win 10, does `ReadConsoleW` at least handle cancellation well if you're in raw mode? (Ideally with vt100 support turned on?)