php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59775 base_priority has no effect
Submitted: 2011-05-18 15:38 UTC Modified: 2011-05-19 10:23 UTC
From: matt at wootkit dot com Assigned: rquadling (profile)
Status: Not a bug Package: win32service (PECL)
PHP Version: 5.3.5 OS: Windows Server 2008 R2 Standard
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: matt at wootkit dot com
New email:
PHP Version: OS:

 

 [2011-05-18 15:38 UTC] matt at wootkit dot com
Description:
------------
When setting the base_priority parameter in win32_create_service it doesn't appear to have any visible effect on the service when it is run.  I'm trying to run the service in above normal priority, but when setting the base_priority to WIN32_ABOVE_NORMAL_PRIORITY_CLASS the service still runs at normal priority, as seen in the task manager.

Also, when setting the base_priority to WIN32_ABOVE_NORMAL_PRIORITY_CLASS I receive this notice:
Notice:  Use of undefined constant WIN32_ABOVE_NORMAL_PRIORITY_CLASS - assumed 'WIN32_ABOVE_NORMAL_PRIORITY_CLASS' in C:\test.php on line 41.

Changing WIN32_ABOVE_NORMAL_PRIORITY_CLASS to 32768 has no effect on the above bug report.

Reproduce code:
---------------
$status = win32_create_service( array(
'service'	=> 'testservice',
'display'	=> 'testservice',
'params'	=> '"C:\\test.php"',
'path'		=> 'C:\\php_net\\php.exe',
'base_priority'	=> 32768,
) ); 

Expected result:
----------------
I expect the service, when started, to show it as running in Above Normal priority when viewed through the task manager.

Actual result:
--------------
The service, when viewed through the task manager, is running in Normal priority.  Any processes I spawn from the test.php script also run under Normal priority.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-19 05:49 UTC] RQuadling at GMail dot com
See my comments on your other bug reports.

You are running an old version of the extension.

You can get the released source at 
http://pecl.php.net/package/win32service
 [2011-05-19 10:23 UTC] RQuadling at GMail dot com
Personal build supplied.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Nov 29 19:03:12 2021 UTC