Files
fn_registry/functions/infra/process_handle.go
T
egutierrez 741fdcee24 feat: add process manager and execution store types (0007b, 0007c)
Process spawn/wait/kill functions for subprocess management with output
capture, timeout, and process group cleanup. DagRun and DagStepResult
types for SQLite execution persistence.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 13:05:13 +02:00

27 lines
465 B
Go

package infra
import (
"bytes"
"os/exec"
"time"
)
// ProcessHandle represents a running subprocess with output buffers.
type ProcessHandle struct {
Cmd *exec.Cmd
Pid int
StartTime time.Time
Dir string
stdout *bytes.Buffer
stderr *bytes.Buffer
}
// ProcessResult contains the outcome of a completed subprocess.
type ProcessResult struct {
ExitCode int
Stdout string
Stderr string
DurationMs int64
Killed bool
}