// 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)
}
