Hey, I was trying to compile libreadline to JavaScript, but to no avail. Upon successful compilation and inclusion, the program using libreadline fails to load due to an unimplemented syscall -- syscall 0x00005414, usually implemented in /usr/include/asm-generic/termios.h. Screenshot relevant and attached.

If this is my fault compiling readline incorrectly, please point me in the right direction or close this ticket.
Doing a grep for that ioctl code in our system code (under system/), looks like it's TIOCSWINSZ, and reading some online docs for that, it seems to be setting the window size?
We don't have much terminal window support right now, but in principle we could add it. The first question is what does "window" mean here - our default html contains a textarea, which I suppose would be the natural thing to refer it to? Then the question is whether HTML textareas support is enough for this purpose (or would we need a canvas?). Once that's figured out, the main implementation for this would go in src/library_syscall.js, see for example #6466 for a recent PR implementing another syscall thing.
I'll try and get on this once I get a minute tonight. Is there anything special I have to be aware of when using emsdk with a custom version of emscripten?
Not 100% sure how GitHub works with PRs and all that so I'm going to link the PR here as well. Here's a fix for this issue by adding TIOCSWINSZ (which is defined in system/lib/libc/musl/arch/emscripten/bits/ioctl.h) to struct_info and handling the terminal window corner case inside of ioctl(). https://github.com/kripken/emscripten/pull/6468
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
I'm working on terminal support for things like this a little at https://github.com/xloem/emterm.git
Most helpful comment
I'm working on terminal support for things like this a little at https://github.com/xloem/emterm.git