hhvm
hhvm copied to clipboard
Missing function cli_set_process_title
example from http://php.net/manual/en/function.cli-set-process-title.php
<?php
$title = "My Amazing PHP Script";
$pid = getmypid(); // you can use this to see your process title in ps
if (!cli_set_process_title($title)) {
echo "Unable to set process title for PID $pid...\n";
exit(1);
} else {
echo "The process title '$title' for PID $pid has been set for your process!\n";
sleep(10);
}
?>
produces:
karp@karp:/tmp$ php 1.php
Fatal error: Call to undefined function cli_set_process_title() in /tmp/1.php on line 5
karp@karp:/tmp$ php -v
HipHop VM 3.5.0-dev~nightly.2014.12.11 (rel)
Compiler: heads/master-0-g2b3474c463cdd0f00d790f5f78626317ae4e49e5
Repo schema: 3b1511f5d6a4d8bb9ef91b84f40041b34430a09c
Extension API: 20140829
Behaviour diff is probably not the best description. It simply isn't implemented.
+1 for this feature
For whoever decides to implement this, PHP appears to implement it based on a bit extracted from PostgreSQL here.
Bump
It would be really nice to have this feature, because when hhvm crashes and we restart HHVM, it kills all the pidof hhvm
processes. Which also include the CLI daemons. If this is implemented, we will be able to rename those processes and save them from being killed.
+1 . We have 5 hhvm instances (services); We want to see how is going each instance. Like. "hhvm-service-user-on-16654"
Looks like PHP has several implementations of this but it shouldn't be a hard function to add to hhvm.
https://github.com/php/php-src/blob/ddfbe07e2836be11020b5a2d044fa1a560787f3a/sapi/cli/ps_title.c#L334
Bump
this should only run using cli "terminal" as the function name imply so you can't test if from browser
php file_name.php
and execute the content of files