@ai-ecoverse/slicc-kernel 1.47.3 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/kernel-worker.js +1 -0
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +82 -9
- package/dist/node-process-worker.js.map +4 -4
- package/dist/node.js +1 -0
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +82 -9
- package/dist/process-worker.js.map +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -460,6 +460,16 @@ WASI and WASIX have no call for file modes, so the kernel adds the import module
|
|
|
460
460
|
| `fd_mode(fd, mode_out)` | the permission bits of an open file or directory |
|
|
461
461
|
| `path_mode(dirfd, path, path_len, flags, mode_out)` | those of a path, of the link itself with `flags & 1` |
|
|
462
462
|
|
|
463
|
+
WASIX's own terminal calls carry only echo and line buffering (`tty_set`) and answer for "the" terminal whatever the descriptor (`tty_get`), so a WASIX program's `cfmakeraw` would leave `^C` a signal and its output post-processed. The kernel adds the import module `slicc_tty`, with the full Linux `struct termios` (musl's 60-byte layout: four `u32` flag words, `c_line`, `c_cc[32]`, then input and output speed; speeds read as `B38400` and are ignored when set) and answers per descriptor, again as a preview1 errno (`ENOTTY` for a descriptor that is no terminal, `EBADF` for one that isn't open, `ENOSYS` from kernels without them):
|
|
464
|
+
|
|
465
|
+
| Import | Does |
|
|
466
|
+
| --- | --- |
|
|
467
|
+
| `tcgetattr(fd, termios_out)` | writes the terminal's termios |
|
|
468
|
+
| `tcsetattr(fd, actions, termios)` | sets every flag and `c_cc` as given (unknown bits are kept and read back), at once for `TCSANOW`, `TCSADRAIN` and `TCSAFLUSH` (0 to 2; anything else is `EINVAL`) |
|
|
469
|
+
| `winsize(fd, winsize_out)` | writes `struct winsize` (`u16` rows, columns, then zero pixels) |
|
|
470
|
+
|
|
471
|
+
A wasix-sysroot that builds `tcgetattr`, `tcsetattr`, `isatty` and `ioctl(TCGETS, TCSETS*, TIOCGWINSZ)` on them gives WASIX programs (python's `tty.setraw`, curses, ruby's `IO#raw`) a really raw terminal. Stock `tty_get` answers `ENOTTY` when none of the process's descriptors is a terminal, instead of an 80×24 terminal that isn't there, so stdio on pipes and files isn't taken for a terminal.
|
|
472
|
+
|
|
463
473
|
Lowering a soft resource limit (`ulimit -S -n 64`) still fails with `EPERM` in Emscripten programs: their libc's `setrlimit` is a stub compiled into the program, not a call to the kernel.
|
|
464
474
|
|
|
465
475
|
### Users
|
package/dist/kernel-worker.js
CHANGED
|
@@ -9494,6 +9494,7 @@ var WasmProcess = class {
|
|
|
9494
9494
|
}
|
|
9495
9495
|
signal(sig) {
|
|
9496
9496
|
if (this.execChild !== void 0) {
|
|
9497
|
+
if (sig === SIG.CONT) this.cont();
|
|
9497
9498
|
void Promise.resolve(this.options.kill?.(this.execChild, sig)).catch(() => void 0);
|
|
9498
9499
|
if (sig !== SIG.KILL) return "forward";
|
|
9499
9500
|
if (!this.options.writesBack?.(this.execChild)) return "terminate";
|