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>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user