Skip to content

Commit e7819f5

Browse files
authored
Merge pull request #2390 from 3405691582/openbsd
2 parents 538e592 + 1fb3dab commit e7819f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/TSCExtensions/Process+Run.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private func setProcessPriority(pid: Process.ProcessID, newPriority: TaskPriorit
182182
if !SetPriorityClass(handle, UInt32(newPriority.windowsProcessPriority)) {
183183
logger.fault("Failed to set process priority of \(pid) to \(newPriority.rawValue): \(GetLastError())")
184184
}
185-
#elseif canImport(Darwin) || canImport(Android)
185+
#elseif canImport(Darwin) || canImport(Android) || os(OpenBSD)
186186
// `setpriority` is only able to decrease a process's priority and cannot elevate it. Since Swift task’s priorities
187187
// can only be elevated, this means that we can effectively only change a process's priority once, when it is created.
188188
// All subsequent calls to `setpriority` will fail. Because of this, don't log an error.

0 commit comments

Comments
 (0)