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

Method agentExecCmd

agent/agentexec/exec.go:105–118  ·  view source on GitHub ↗
(cmd string, args ...string)

Source from the content-addressed store, hash-verified

103}
104
105func (e priorityExecer) agentExecCmd(cmd string, args ...string) (string, []string) {
106 execArgs := []string{"agent-exec"}
107 if e.oomScore != unset {
108 execArgs = append(execArgs, oomScoreArg(e.oomScore))
109 }
110
111 if e.niceScore != unset {
112 execArgs = append(execArgs, niceScoreArg(e.niceScore))
113 }
114 execArgs = append(execArgs, "--", cmd)
115 execArgs = append(execArgs, args...)
116
117 return e.binPath, execArgs
118}
119
120// envValInt searches for a key in a list of environment variables and parses it to an int.
121// If the key is not found or cannot be parsed, returns 0 and false.

Callers 2

CommandContextMethod · 0.95
PTYCommandContextMethod · 0.95

Calls 2

oomScoreArgFunction · 0.85
niceScoreArgFunction · 0.85

Tested by

no test coverage detected