Req #54865 [Opn->Csd]: Child process inherits parent priority

From: Date: Sun, 16 Oct 2016 02:19:35 +0000
Subject: Req #54865 [Opn->Csd]: Child process inherits parent priority
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204818@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54865&edit=1 ID: 54865 Updated by: kalle@php.net Reported by: matt at wootkit dot com Summary: Child process inherits parent priority -Status: Open +Status: Closed Type: Feature/Change Request Package: Program Execution Operating System: Windows Server 2008 R2 PHP Version: 5.3.6 -Assigned To: +Assigned To: kalle Block user comment: N Private report: N New Comment: Hi, I have implemented proc_nice() for Windows in 7.2, as it is too late for 7.1. Previous Comments: ------------------------------------------------------------------------ [2011-05-19 19:24:40] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=54865&edit=1

« previous php.bugs (#204818) next »