Function
spawn
(file: string, args: string[], opts: Opts)
Source from the content-addressed store, hash-verified
| 4 | export type { Disp, Exit, Opts, Proc } from "./pty" |
| 5 | |
| 6 | export function spawn(file: string, args: string[], opts: Opts): Proc { |
| 7 | const proc = pty.spawn(file, args, opts) |
| 8 | return { |
| 9 | pid: proc.pid, |
| 10 | onData(listener) { |
| 11 | return proc.onData(listener) |
| 12 | }, |
| 13 | onExit(listener) { |
| 14 | return proc.onExit(listener) |
| 15 | }, |
| 16 | write(data) { |
| 17 | proc.write(data) |
| 18 | }, |
| 19 | resize(cols, rows) { |
| 20 | proc.resize(cols, rows) |
| 21 | }, |
| 22 | kill(signal) { |
| 23 | proc.kill(signal) |
| 24 | }, |
| 25 | } |
| 26 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected