You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Process.run ends the run on the Node host instead of running the program #1468
bend main.bend -o main.js, then node main.js, with main.bend the file below (a Process.run of /bin/echo). The standalone JS program is a verification lane recent fixes check on Node too (#1446, #1450), and AGENTS.md names the loader "for bun and node".
What happened
Under Bun the program prints the child's output and exits 0. Under Node the run ends before any answer:
$ bun main.js
Done 0 [hello
] []
end
$ node main.js
ReferenceError: Worker is not defined
at process_run (...)
exit 1
A host without Bun has no global Worker and no Bun.spawn, so Process.run cannot run its worker and the ReferenceError ends the run through io_errs: the effect never answers, and every computation after it is lost. The same host abort hits the effects that bind libc through bun:ffi (File.read, File.read_bytes, File.read_at, TCP., UDP., Socket.close, Listener.close), which end with Error: Cannot find module 'bun:ffi'; those may be a design call (answer Fail on a host without FFI, or grow node paths), so I am keeping this issue on Process.run, which has a direct fix: node:child_process.spawnSync is the semantics the C lane models (#1392), and the fix PR runs on it.
Measured on current main (5e70819), Linux x86_64: the permanent tests/io/process_run.bend, emitted standalone and run under Node with the fix branch, answers all 19 rows True, including timeout (ETIMEDOUT), the combined output cap (EFBIG), a runaway descendant past the cap, exit and signal codes, and a missing executable (ENOENT).
Activity