Skip to content

Commit b8725f2

Browse files
committed
overlooked changes
1 parent 5076cf0 commit b8725f2

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
func CLI() error {
25-
// We lock the OS thread here to avoid a race conditino where the nice priority
25+
// We lock the OS thread here to avoid a race condition 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
func defaultNiceScore() (int, error) {
88-
score, err := unix.Getpriority(unix.PRIO_PROCESS, os.Getpid())
88+
score, err := unix.Getpriority(unix.PRIO_PROCESS, 0)
8989
if err != nil {
9090
return 0, 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)