btv.process
process:write(data)
Write raw bytes to the child’s still-open stdin. Accepts a string or a list of strings (concatenated). A no-op once the child has exited.
Defined in process.lua.
process:kill()
Terminate the child (its on_exit still fires with code -1).
Defined in process.lua.
btv.process.open(spec)
btv.process.open { cmd, args, cwd, env, on_stdout, on_stderr, on_exit } -> handle.
Spawns a duplex child and returns a handle with :write(data) and :kill(). The
callbacks fire on the editor thread (they may queue effects — extmarks, view
renders — like any btv callback): on_stdout(chunk) / on_stderr(chunk) per raw
batch, on_exit(code) exactly once.
Defined in process.lua.