php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #46487 'no wait'/'detach' option for proc_close()
Submitted: 2008-11-05 01:52 UTC Modified: 2020-11-05 13:16 UTC
Votes:6
Avg. Score:3.2 ± 0.4
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: louis at steelbytes dot com Assigned: cmb (profile)
Status: Closed Package: Program Execution
PHP Version: 5.2.6 OS: Windows
Private report: No CVE-ID: None
 [2008-11-05 01:52 UTC] louis at steelbytes dot com
Description:
------------
I'd luv a 'no wait'/'detach' option for proc_close() so I can spawn a process and not wait for completion.

current work arounds on windows

1)
	$WshShell = new COM("WScript.Shell");
	$res = $WshShell->Run($cmd,0,false)==0; 

2)
	$proc = @proc_open(
		'"'.getenv('ComSpec').'" /c start "php" '.$cmd
		,array( 0=>array('file','nul','r'), 1=>array('file','nul','w'), 2=>array('file','nul','w') )
		,$pipes,NULL,NULL,array('bypass_shell'=>TRUE)
		);
	if ($proc!==false)
	{
		proc_close($proc);
		$res = true;
	}
	else
		$res = false;



Reproduce code:
---------------
see above

Expected result:
----------------
n/a

Actual result:
--------------
n/a

Patches

proc_close-lingering.patch (last revision 2012-07-12 15:00 UTC by jille at hexon dot cx)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-05 13:16 UTC] cmb@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: Program Execution -Assigned To: +Assigned To: cmb
 [2020-11-05 13:16 UTC] cmb@php.net
This has already been implemented[1], and is available as of PHP
5.5.0.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=dba22c08640b02e68bfea68440246fec1fb7459d>
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Dec 05 12:01:22 2020 UTC