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: -
Votes:5
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:
Status: Open Package: Feature/Change Request
PHP Version: 5.2.6 OS: Windows
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [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
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 01:01:59 2014 UTC