php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54865 Child process inherits parent priority
Submitted: 2011-05-19 19:24 UTC Modified: 2016-10-16 02:19 UTC
From: matt at wootkit dot com Assigned: kalle (profile)
Status: Closed Package: Program Execution
PHP Version: 5.3.6 OS: Windows Server 2008 R2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: matt at wootkit dot com
New email:
PHP Version: OS:

 

 [2011-05-19 19:24 UTC] matt at wootkit dot com
Description:
------------
I'm running PHP in above-normal priority and would like to have child processes of it, spawned using proc_open, to inherit that priority level.

In Windows I believe this should just be a matter of running:
SetPriorityClass( GetCurrentProcess(), desired_priority );

I'm not sure if this is a bug report or a feature request though, I guess it depends on how you view it.

Test script:
---------------
$path = "c:\\windows\\system32\\notepad.exe";
$descriptorspec = array();
$cwd = "c:\\windows\\temp";
$env = NULL;
$other_options = array(
	'bypass_shell'	=> FALSE,
);

$resource = proc_open(
	$path,
	$descriptorspec,
	$pipes,
	$cwd,
	$env,
	$other_options
);

Expected result:
----------------
I expect the notepad.exe to have the abovenormal priority level, which is what the parent php script was running at.

Actual result:
--------------
notepad.exe runs at the normal priority level.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-16 02:19 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2016-10-16 02:19 UTC] kalle@php.net
Hi, I have implemented proc_nice() for Windows in 7.2, as it is too late for 7.1.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 03:01:27 2024 UTC