Define and support /dev/fd semantics for WASIX
Bash process substitution can pass paths such as /dev/fd/63 to a child, referring to an inherited descriptor. WASIX currently cannot open these paths.
Wasinix carries a patch that recognizes absolute /dev/fd/N strings in path_open2 and clones the matching descriptor. That demonstrates the compatibility need, but may not be the right general implementation: it bypasses normal path resolution and does not define the behavior of access modes, descriptor rights, open flags, or shared file offsets.
Define the intended WASIX semantics and implement /dev/fd/N in the appropriate process-aware namespace layer. Tests should cover an inherited pipe used by Bash process substitution, regular-file offset behavior, incompatible access modes, and missing or malformed descriptor numbers.
Wasinix downstream context
- Related patch:
wasmer-dev-fd.patch - Patch-removal experiment: wasix-org/wasinix#246
Source: wasmerio/wasmer