Req #49586 [Opn->Wfx]: argv variables reverse registration
Edit report at http://bugs.php.net/bug.php?id=49586&edit=1
ID: 49586
Updated by: jani@php.net
Reported by: michael dot schmidt at innogames dot de
-Summary: argv Varriables reverse registration
+Summary: argv variables reverse registration
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Linux
PHP Version: 5.3.0
Block user comment: N
Private report: N
New Comment:
http://www.steve.org.uk/Reference/Unix/faq_2.html#SEC22
Something like pcntl_exec() might work.
Previous Comments:
------------------------------------------------------------------------
[2010-02-22 04:54:58] just at another dot joe
Even better would be to make it so that $argv[1]="foo"; simply
auto-updated, without the need to call a function, but I'd be quite
happy with any update.
------------------------------------------------------------------------
[2009-09-18 09:47:17] michael dot schmidt at innogames dot de
Description:
------------
Sometimes i write php-cli Daemons who forks many different kind of
childs. There is no way to identify this processes (e.g. by using ps or
top ...)
If i change the argv varriable in my php-script, the argv varriables of
the php-interpreter are untouched.
A solution would be a function which re-syncs the $argv from the
php-script to the interpreter. This would change /proc/<pid>/cmdline and
ps / top would display the given string.
Reproduce code:
---------------
<?php
$argv[1] = "BAR"; // Override argv
resyncargv(); // Requested function
?>
Expected result:
----------------
linux:~# ps ax
4030 ? S 0:04 /usr/bin/php foo.php
Actual result:
--------------
linux:~# ps ax
4030 ? S 0:04 /usr/bin/php BAR
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=49586&edit=1
Thread (4 messages)