setproctitle

(PECL proctitle >= 0.1.0)

setproctitleSet the process title

说锟斤拷

setproctitle ( string $title ) : void

Sets the process title of the current process.

锟斤拷锟斤拷

title

The title to use as the process title.

锟斤拷锟斤拷值

没锟叫凤拷锟斤拷值锟斤拷

锟斤拷锟斤拷

Example #1 setproctitle() example

Running the example below will change the process title (visible with ps a for example).

<?php
setproctitle
("myscript");
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

$ ps a
  PID TTY      STAT   TIME COMMAND
 1168 pts/3    S      0:00 myscript                                                                                                                         

锟轿硷拷

  • cli_set_process_title() - Sets the process title
  • pcntl_fork() - 锟节碉拷前锟斤拷锟教碉拷前位锟矫诧拷锟斤拷锟斤拷支锟斤拷锟接斤拷锟教o拷锟斤拷锟斤拷注锟斤拷fork锟角达拷锟斤拷锟斤拷一锟斤拷锟接斤拷锟教o拷锟斤拷锟斤拷锟教猴拷锟接斤拷锟斤拷 锟斤拷锟斤拷fork锟斤拷位锟矫匡拷始锟斤拷锟铰硷拷锟斤拷执锟叫o拷锟斤拷同锟斤拷锟角革拷锟斤拷锟斤拷执锟叫癸拷锟斤拷锟叫o拷锟矫碉拷锟斤拷fork锟斤拷锟斤拷值为锟接斤拷锟斤拷 锟脚o拷锟斤拷锟接斤拷锟教得碉拷锟斤拷锟斤拷0锟斤拷
  • setthreadtitle() - Set the thread title