executil

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package executil provides helpers for spawning subprocesses.

Index

Constants

View Source
const DefaultBdTimeout = 5 * time.Minute

DefaultBdTimeout is the default timeout for bd subprocess invocations. bd operations on anvils with remote Dolt (e.g. via kubectl port-forward) and GitHub auto-sync can routinely take 20-30 seconds per write, so the timeout must be generous enough to accommodate that latency.

Variables

This section is empty.

Functions

func DecodeJSON added in v0.13.0

func DecodeJSON(data []byte, v any) error

DecodeJSON decodes one JSON value from subprocess output that may contain leading or trailing non-JSON noise (log lines, diagnostics, etc.). It uses json.NewDecoder which tolerates trailing data after the JSON value, and falls back to scanning for the first '{' or '[' to handle leading noise.

func HideWindow

func HideWindow(cmd *exec.Cmd) *exec.Cmd

HideWindow configures cmd to not create a visible console window. On Windows this sets CREATE_NO_WINDOW. On other platforms it is a no-op.

func SetProcessGroup added in v0.13.0

func SetProcessGroup(cmd *exec.Cmd) *exec.Cmd

SetProcessGroup configures cmd to start in its own process group. On Unix this sets Setpgid so signals can be sent to the entire group via kill(-pid, sig). On Windows this sets CREATE_NEW_PROCESS_GROUP.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL