From:             michael dot schmidt at innogames dot net
Operating system: Linux
PHP version:      5.3.0
PHP Bug Type:     Feature/Change Request
Bug description:  argv Varriables reverse registration

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 bug report at http://bugs.php.net/?id=49586&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49586&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49586&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49586&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49586&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49586&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49586&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49586&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49586&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49586&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49586&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49586&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49586&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49586&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49586&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49586&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49586&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49586&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49586&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49586&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49586&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49586&r=mysqlcfg

Reply via email to