workqueue: handle nice better
authorVincent Fu <vincent.fu@samsung.com>
Fri, 29 Sep 2023 14:04:50 +0000 (10:04 -0400)
committerVincent Fu <vincent.fu@samsung.com>
Fri, 29 Sep 2023 15:51:10 +0000 (11:51 -0400)
commit1353b1b9bbd6717c89e32883e87aa5cfe4cb04dc
treecdd638f6c1c06ee4ef0df1e081b87428c172c311
parent06812a4f0e4ff4847076e742557ab406a0e96848
workqueue: handle nice better

nice returns the program's schedule priority. This can be a negative
value when there is no error condition. To check if nice is triggering
an error we have to check errno.

The most recent three macOS test failures appear to be due to this
problem.

https://github.com/axboe/fio/actions/runs/6347762639/job/17243247222
https://github.com/axboe/fio/actions/runs/6346019205/job/17239370410
https://github.com/axboe/fio/actions/runs/6241934089/job/16944981876

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
workqueue.c