#49586 [Com]: argv Varriables reverse registration
ID: 49586
Comment by: just at another dot joe
Reported By: michael dot schmidt at innogames dot de
Status: Open
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 5.3.0
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2009-09-18 13:03:54] michael dot schmidt at innogames dot de
<Email address fixed>
------------------------------------------------------------------------
[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/?id=49586&edit=1
Thread (4 messages)