#49586 [Opn]: argv Varriables reverse registration
| From: | michael dot schmidt at innogames dot de | Date: | Fri, 18 Sep 2009 13:03:55 +0000 |
| Subject: | #49586 [Opn]: argv Varriables reverse registration | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142517@lists.php.net to get a copy of this message | ||
ID: 49586
User updated by: michael dot schmidt at innogames dot de
-Reported By: michael dot schmidt at innogames dot net
+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:
<Email address fixed>
Previous Comments:
------------------------------------------------------------------------
[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