We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentb8fc6bb commit6521eb1Copy full SHA for 6521eb1
agent/agentexec/exec.go
@@ -34,6 +34,10 @@ func CommandContext(ctx context.Context, cmd string, args ...string) (*exec.Cmd,
34
returnexec.CommandContext(ctx,cmd,args...),nil
35
}
36
37
+// PTYCommandContext returns an pty.Cmd that calls "coder agent-exec" prior to exec'ing
38
+// the provided command if CODER_PROC_PRIO_MGMT is set, otherwise a normal pty.Cmd
39
+// is returned. All instances of pty.Cmd should flow through this function to ensure
40
+// proper resource constraints are applied to the child process.
41
funcPTYCommandContext(ctx context.Context,cmdstring,args...string) (*pty.Cmd,error) {
42
cmd,args,err:=agentExecCmd(cmd,args...)
43
iferr!=nil {