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

Commitb8725f2

Browse files
committed
overlooked changes
1 parent5076cf0 commitb8725f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎agent/agentexec/cli_linux.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const unset = -2000
2222

2323
// CLI runs the agent-exec command. It should only be called by the cli package.
2424
funcCLI()error {
25-
// We lock the OS thread here to avoid a raceconditino where the nice priority
25+
// We lock the OS thread here to avoid a racecondition where the nice priority
2626
// we get is on a different thread from the one we set it on.
2727
runtime.LockOSThread()
2828
// Nop on success but we do it anyway in case of an error.
@@ -85,7 +85,7 @@ func CLI() error {
8585
}
8686

8787
funcdefaultNiceScore() (int,error) {
88-
score,err:=unix.Getpriority(unix.PRIO_PROCESS,os.Getpid())
88+
score,err:=unix.Getpriority(unix.PRIO_PROCESS,0)
8989
iferr!=nil {
9090
return0,xerrors.Errorf("get nice score: %w",err)
9191
}

‎agent/agentexec/main_linux_test.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build linux
2+
// +build linux
3+
14
package agentexec_test
25

36
import (

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp