There is a PECL extension that already does something similar. You may want to take a look at that.
http://pecl.php.net/package/proctitle On 7 February 2013 05:40, Keyur Govande <keyurgova...@gmail.com> wrote: > Hello, > > I've created a new RFC to improve support for setting a CLI process' title > on Linux. It is based off of the PostgreSQL implementation and is more > robust than the proctitle extension. > > More details and patch here: https://wiki.php.net/rfc/cli_process_title > > Thanks, > Keyur. >