(cmd string, args ...string)
| 103 | } |
| 104 | |
| 105 | func (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. |
no test coverage detected