Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: add additional context to agent exec errors#15676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sreya merged 2 commits intomainfromjon/execdebug
Nov 27, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletionsagent/agentexec/cli_linux.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -72,15 +72,15 @@ func CLI() error {
// We alert the user instead of failing the command since it can be difficult to debug
// for a template admin otherwise. It's quite possible (and easy) to set an
// inappriopriate value for niceness.
printfStdErr("failed to adjust niceness to %q: %v", *nice, err)
printfStdErr("failed to adjust niceness to %d for cmd %+v: %v", *nice, args, err)
}

err = writeOOMScoreAdj(*oom)
if err != nil {
// We alert the user instead of failing the command since it can be difficult to debug
// for a template admin otherwise. It's quite possible (and easy) to set an
// inappriopriate value for oom_score_adj.
printfStdErr("failed to adjust oom score to %q: %v", *nice, err)
printfStdErr("failed to adjust oom score to %d for cmd %+v: %v", *oom, args, err)
}

path, err := exec.LookPath(args[0])
Expand DownExpand Up@@ -138,7 +138,7 @@ func oomScoreAdj() (int, error) {
}

func writeOOMScoreAdj(score int) error {
return os.WriteFile("/proc/self/oom_score_adj", []byte(fmt.Sprintf("%d", score)), 0o600)
return os.WriteFile(fmt.Sprintf("/proc/%d/oom_score_adj", os.Getpid()), []byte(fmt.Sprintf("%d", score)), 0o600)
}

// execArgs returns the arguments to pass to syscall.Exec after the "--" delimiter.
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp