File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const unset = -2000
22
22
23
23
// CLI runs the agent-exec command. It should only be called by the cli package.
24
24
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
26
26
// we get is on a different thread from the one we set it on.
27
27
runtime .LockOSThread ()
28
28
// Nop on success but we do it anyway in case of an error.
@@ -85,7 +85,7 @@ func CLI() error {
85
85
}
86
86
87
87
func defaultNiceScore () (int , error ) {
88
- score , err := unix .Getpriority (unix .PRIO_PROCESS , os . Getpid () )
88
+ score , err := unix .Getpriority (unix .PRIO_PROCESS , 0 )
89
89
if err != nil {
90
90
return 0 , xerrors .Errorf ("get nice score: %w" , err )
91
91
}
Original file line number Diff line number Diff line change
1
+ //go:build linux
2
+ // +build linux
3
+
1
4
package agentexec_test
2
5
3
6
import (
You can’t perform that action at this time.
0 commit comments