def open

bend-stdio-pipes@0.2.0.0 · impl.bend:15

import bend-stdio-pipes@0.2.0.0/impl.bend as Impl
import Base

15# Start a program, with its stdin and stdout as pipes: its process id, the File that writes its
16# stdin, and the File that reads its stdout. Its stderr is ours. Closing the stdin File gives it
17# EOF; nothing waits for it to exit. On JS, it runs on Bun on Linux and macOS only; elsewhere it
18# fails with ENOSYS.
19def open(
20  program: String,
21  args: List<String>
22) -> IO(Result<&1, &1, U32 & String, U32 & (File & File)>):
23  import "./open.c"
24  import "./open.js"

Uses (7)

Used by (1)