[PATH 0 of 1] Fix check for nice() return value

6 views
Skip to first unread message

Lee Duncan

unread,
May 21, 2013, 5:15:00 PM5/21/13
to open-...@googlegroups.com
I mentioned this before, but I didn't have a good solution at the time.

In usr/iscsi_util.c, nice() is called like this:

if (nice(-10) < 0)
log_debug(...)

The problem is that nice() returns the current nice value,
and that value can legitimately be less than zero, in which
case a spurious log message is generated.

Although I don't like setting errno directly except when in a
library, the nice(2) man page actually suggests this as the
best way to fix the problem.

Therefore, the supplied patch is designed to fix this problem.

--
Ignore the Lee-Man behind the curtain ...

"Life's a long song. But the tune ends too soon for us all." -- Ian Anderson

The Lee-Man

unread,
May 21, 2013, 5:17:58 PM5/21/13
to open-...@googlegroups.com
Apologies for Subject formatting errors ... I need to wean myself off of OS X ...
Reply all
Reply to author
Forward
0 new messages