common: fix return value check for setpriority (#18412)

* common: fix return value check for setpriority

* tools: add logging for process priority setting
This commit is contained in:
o7si authored and GitHub committed 2025-12-29 11:07:49 +02:00
1 parent e70e640db3
commit daa242dfc8
3 files changed
+9 -3

No files matched your search

+1 -1
View File
@@ -251,7 +251,7 @@ bool set_process_priority(enum ggml_sched_priority prio) {
case GGML_SCHED_PRIO_REALTIME: p = -20; break;
}
if (!setpriority(PRIO_PROCESS, 0, p)) {
if (setpriority(PRIO_PROCESS, 0, p) != 0) {
LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno);
return false;
}