diff --git a/docs/architecture/filesystem.md b/docs/architecture/filesystem.md index 189a7ef..b714ecf 100644 --- a/docs/architecture/filesystem.md +++ b/docs/architecture/filesystem.md @@ -269,6 +269,16 @@ both need the `..` fixup and the ancestor-loop check that are not written. a deadlock rather than a wrong answer. - **`rename()` does not move directories**, and will not replace one. `EISDIR` either way. +- **No named pipes.** `mkfifo()` does not fail — it *succeeds* and produces a + character device, because `mknod()` turns `S_IFIFO` into a `T_DEV` and keeps + the major/minor. `ls -l` shows `crw-rw-rw- 438, 0` where a `p` belongs, and + nothing written to it comes back out. Succeeding wrongly is worse than + refusing: the zsh port was configured with `zsh_cv_sys_fifo=yes` on the + strength of it, and process substitution failed at the point of use rather + than being reported as unavailable. +- **No `/dev/fd`, and no `/proc/self`.** A process cannot reach its own open + descriptors by path. `<(cmd)` needs one or the other — zsh now knows it has + neither and says so. - **No `AF_UNIX` socket inodes.** Socket names live in a table in `kernel/net/unix.c`, so `bind()` creates nothing that can be `stat()`ed or `unlink()`ed. diff --git a/docs/history/kernel.md b/docs/history/kernel.md index 0b51c5d..f1c8967 100644 --- a/docs/history/kernel.md +++ b/docs/history/kernel.md @@ -505,6 +505,25 @@ The lesson is narrow and worth stating: when a probe that reproduces a program's exact syscall sequence behaves correctly and the program does not, stop looking under the syscalls and start looking at the build. +#### Two more in the same block + +Checking the rest of `ZSH_CACHE` after fixing that one found two more answers +claiming capabilities SchOS does not have, both `yes`, both measurable on the +running system in one line each: + +- `zsh_cv_sys_path_dev_fd=/dev/fd` — neither `/dev/fd` nor `/proc/self/fd` + exists. `<(cmd)` therefore failed at the point of use with `cat: + /dev/fd/11: No such file or directory`, which reads as a broken command + rather than an unimplemented feature. +- `zsh_cv_sys_fifo=yes` — `mkfifo()` does not fail, it *succeeds* and produces + a character device: `mknod()` turns `S_IFIFO` into a `T_DEV`, so `ls -l` + shows `crw-rw-rw- 438, 0` and nothing written comes back out. + +Both are `no` now, and `<(cmd)` says *"doesn't look like your system supports +FIFOs"* — which names the missing feature instead of blaming `cat`. The gaps +themselves are recorded in +[../architecture/filesystem.md](../architecture/filesystem.md). + --- This was left here deliberately rather than continuing to iterate blind: diff --git a/ports/zsh/Makefile b/ports/zsh/Makefile index 713eddc..56687b9 100644 --- a/ports/zsh/Makefile +++ b/ports/zsh/Makefile @@ -113,6 +113,25 @@ ZSH_LIBS := -lncursesw $(MUSL)/lib/libc.a $(LIBGCC) $(MUSL)/lib/libc.a \ # # The cruel part: autoconf's own cross-compilation default for this one is # `yes`. Leaving the line out entirely would have been correct. +# +# Two more in this block claimed capabilities SchOS does not have, found by +# checking the rest after the one above. Both were `yes`, and both are facts +# that can simply be measured on the running system: +# +# zsh_cv_sys_path_dev_fd /dev/fd and /proc/self/fd do not exist. Telling +# zsh otherwise made `<(cmd)` fail at the point of +# use with `cat: /dev/fd/11: No such file or +# directory`, which reads as a broken command +# rather than an unimplemented feature. +# +# zsh_cv_sys_fifo mkfifo() "succeeds" and produces a *character +# device*: the kernel's mknod turns S_IFIFO into a +# T_DEV, so `ls -l` shows `crw-rw-rw- 438, 0`, and +# nothing written to it comes back out. Named pipes +# are not implemented. +# +# With both `no`, zsh knows it cannot do process substitution and says so, +# which is the honest state until FIFOs exist. ZSH_CACHE := \ zsh_cv_shared_environ=yes \ zsh_cv_shared_tgetent=no \ @@ -120,8 +139,8 @@ ZSH_CACHE := \ zsh_cv_sys_nis=no \ zsh_cv_sys_nss=no \ zsh_cv_func_realpath_accepts_null=yes \ - zsh_cv_sys_path_dev_fd=/dev/fd \ - zsh_cv_sys_fifo=yes \ + zsh_cv_sys_path_dev_fd=no \ + zsh_cv_sys_fifo=no \ zsh_cv_sys_killesrch=yes \ zsh_cv_sys_signal_handler=void \ zsh_cv_prog_tcsetpgrp=yes \