Files
el/runtime/exec.el
T
Will Anderson f2c63f95fd add runtime/fs.el, exec.el, env.el — filesystem, subprocess, environment in El
Migrates fs_read/write/exists/mkdir/write_bytes/list, exec/exec_bg/exec_command/exec_capture,
env/args/exit_program, state_set/get/del/keys, uuid_new/v4, and list helpers get/len from
el_runtime.c into El source as thin wrappers over seed primitives.
2026-05-03 15:35:45 -05:00

28 lines
938 B
EmacsLisp

// runtime/exec.el subprocess execution
// All four names resolve to the same seed primitives so callers can use
// whichever name matches their mental model of the operation.
// exec run a shell command, capture stdout, return as String.
// Blocks until the subprocess exits (30-second wall-clock deadline in the
// seed layer). Returns "" on any error.
fn exec(cmd: String) -> String {
return __exec(cmd)
}
// exec_bg fire-and-forget subprocess. Returns immediately; no stdout.
fn exec_bg(cmd: String) {
__exec_bg(cmd)
}
// exec_command alias for exec(); preferred when callers care about side
// effects (e.g. invoking a build tool) rather than captured output.
fn exec_command(cmd: String) -> String {
return __exec(cmd)
}
// exec_capture alias for exec(); preferred when callers explicitly want
// to capture and process stdout.
fn exec_capture(cmd: String) -> String {
return __exec(cmd)
}