classification
Title: HAVE_BROKEN_NICE detected incorrectly due to configure.ac typo
Type: behavior Stage:
Components: Build Versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: George.Kouryachy, benjamin.peterson
Priority: normal Keywords:

Created on 2014-01-30 12:57 by George.Kouryachy, last changed 2014-02-01 19:15 by George.Kouryachy. This issue is now closed.

Messages (4)
msg209712 - (view) Author: George Kouryachy (George.Kouryachy) Date: 2014-01-30 12:57
It's declared in pyconfig.h that HAVE_BROKEN_NICE is set if nice() returns success/failure instead of the new priority.

But configure checks just opposite (as for http://hg.python.org/cpython/file/03fc7449f204/configure.ac#l4234):

  if (val1 != -1 && val1 == nice(2))
    exit(0);

We need "val1 != nice(2)" instead (to ensure that nicelevel is increased) or "val1 == nice(2)+2" (to check increment is proper; this can be tricky in some cases).
msg209715 - (view) Author: George Kouryachy (George.Kouryachy) Date: 2014-01-30 13:17
It seems to be permanent typo through all branches :(
msg209727 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2014-01-30 17:05
Are you sure? The configure test sets ac_cv_broken_nice=1 if "val1 == nice(2)". That is if the call returns the same succesful value each time.
msg209912 - (view) Author: George Kouryachy (George.Kouryachy) Date: 2014-02-01 19:15
Oops, looks like my local build system artifact.

Thank you for your attention, all-clear.
History
Date User Action Args
2014-02-01 19:15:04George.Kouryachysetstatus: open -> closed
resolution: not a bug
messages: + msg209912
2014-01-30 17:05:40benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg209727
2014-01-30 13:17:18George.Kouryachysetmessages: + msg209715
versions: + Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
2014-01-30 12:57:41George.Kouryachycreate