Req #46487 [Opn->Csd]: 'no wait'/'detach' option for proc_close()

From: Date: Thu, 05 Nov 2020 13:16:53 +0000
Subject: Req #46487 [Opn->Csd]: 'no wait'/'detach' option for proc_close()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230130@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=46487&edit=1

 ID:                 46487
 Updated by:         cmb@php.net
 Reported by:        louis at steelbytes dot com
 Summary:            'no wait'/'detach' option for proc_close()
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            Program Execution
 Operating System:   Windows
 PHP Version:        5.2.6
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

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>


Previous Comments:
------------------------------------------------------------------------
[2012-07-12 15:11:34] jille at hexon dot cx

See also: http://news.php.net/php.internals/61168 and https://github.com/Jille/php-src/commit/31a1aa384c29487e077ccf3fd067eca188cf1201

------------------------------------------------------------------------
[2008-11-05 01:52:36] 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


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=46487&edit=1


Thread (3 messages)

« previous php.bugs (#230130) next »