php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #29638 action performed by proc_nice() unclear
Submitted: 2004-08-12 22:07 UTC Modified: 2004-08-12 23:24 UTC
From: php at riggers dot me dot uk Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.0.0 OS: Linux Fedora Core 2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at riggers dot me dot uk
New email:
PHP Version: OS:

 

 [2004-08-12 22:07 UTC] php at riggers dot me dot uk
Description:
------------
Value passes to proc_nice is aggregated, rather that set to the actual value.

Reproduce code:
---------------
<?php

var_dump(proc_nice(3));
sleep(5);
var_dump(proc_nice(6));
sleep(5);
var_dump(proc_nice(7));
sleep(5);

?>

Inspect 'top' output as script is running

Expected result:
----------------
It is not made clear that the value is aggregated: it is reasonable to assume from the docs that the nice level will be set to whatever you pass.

After the 3rd call to proc_nice(), the nice value is 16 and not 7

Actual result:
--------------
Nice value is set to 16 correctly, but documentation does not make this clear.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-12 22:16 UTC] dave@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

I changed the parameter name to "increment", and it now says: "proc_nice increases the priority of the current process. You can use a negative increment to decrease the priority."
 [2004-08-12 22:57 UTC] php at riggers dot me dot uk
--- Quote ---
"proc_nice
increases the priority of the current process. You can use a negative
increment to decrease the priority."
--- End Quote ---

Hi, I think it's the other way around i.e. a positive value decreases priority and negative value increases priority
 [2004-08-12 23:24 UTC] dave@php.net
You're right, it now reads: "proc_nice() changes the priority of the current process by the amount specified in increment. A positive increment will lower the priority of the current process, whereas a negative increment will raise the priority."
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 16 17:01:27 2024 UTC