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

Reply via email to