MCPcopy Index your code
hub / github.com/coder/coder / PTYCommandContext

Method PTYCommandContext

agent/agentexec/exec.go:43–43  ·  view source on GitHub ↗

PTYCommandContext returns an pty.Cmd that calls "coder agent-exec" prior to exec'ing the provided command if CODER_PROC_PRIO_MGMT is set, otherwise a normal pty.Cmd is returned. All instances of pty.Cmd should flow through this function to ensure proper resource constraints are applied to the child

(ctx context.Context, cmd string, args ...string)

Source from the content-addressed store, hash-verified

41 // is returned. All instances of pty.Cmd should flow through this function to ensure
42 // proper resource constraints are applied to the child process.
43 PTYCommandContext(ctx context.Context, cmd string, args ...string) *pty.Cmd
44}
45
46func NewExecer() (Execer, error) {

Callers 5

doAttachMethod · 0.65
newBufferedFunction · 0.65
CreateCommandMethod · 0.65
TestIntegrationDockerFunction · 0.65
PTYCommandContextMethod · 0.65

Implementers 6

recordedExeceragent/x/agentdesktop/portabledesktop_i
execeragent/agentexec/exec.go
priorityExeceragent/agentexec/exec.go
testDevcontainerExeceragent/agentcontainers/devcontainercli_
fakeExeceragent/agentcontainers/api_test.go
commandEnvExeceragent/agentcontainers/execer.go

Calls

no outgoing calls

Tested by 1

TestIntegrationDockerFunction · 0.52