commit | 649c10c59b016ae8586e54746d3761bc6df33c9b | [log] [tgz] |
---|---|---|
author | Bruce Cran <bruce@cran.org.uk> | Mon Feb 20 07:59:06 2012 +0100 |
committer | Jens Axboe <axboe@kernel.dk> | Mon Feb 20 07:59:06 2012 +0100 |
tree | 11944639a6a01506a2c810c77f3e47ac4fbb9178 | |
parent | 0209e1e5a24979172596cd1e249b32eaba78969f [diff] |
nice() error handling I've attached a patch which fixes a potential issue I noticed while reading the POSIX specs: nice() can succeed and return -1, so it's recommended to set errno to 0 and check it afterwards: "As -1 is a permissible return value in a successful situation, an application wishing to check for error situations should set errno to 0, then call nice(), and if it returns -1, check to see whether errno is non-zero." Signed-off-by: Jens Axboe <axboe@kernel.dk>