From: steve-php-dev at spwiz dot com Operating system: Linux 2.4 kernel PHP version: 5.0.5 PHP Bug Type: Feature/Change Request Bug description: Implement some sort of setproctitle() in cli version
Description: ------------ I'm using the pcntl module in the CLI SAPI to fork off several processes. I'd like the processes to be able to identify themselves in ps. In Linux, you can do this by editing argv[0]. On BSD, you use the setproctitle() function. Other higher level languages support this feature. A simple perl script to do this on Linux would be: $0 = "bogus"; sleep 10; I tried modifying $argv[0], but that only modified the PHP scripts copy of argv, not the real argv. It'd be nice if there was a way to modify the process title directly. Ideally, it would be cross-platform (for Unix variants, at least). This was originally requested in 2002 (http://bugs.php.net/bug.php?id=18400), but was rejected. When using the pcntl functions in the CLI version, it really would be a useful feature. -- Edit bug report at http://bugs.php.net/?id=34570&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34570&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34570&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34570&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34570&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34570&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34570&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34570&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34570&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34570&r=support Expected behavior: http://bugs.php.net/fix.php?id=34570&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34570&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34570&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34570&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34570&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34570&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34570&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34570&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34570&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34570&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34570&r=mysqlcfg