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() - �ڵ�ǰ���̵�ǰλ�ò�����֧���ӽ��̣�����ע��fork�Ǵ�����һ���ӽ��̣������̺��ӽ��� ����fork��λ�ÿ�ʼ���¼���ִ�У���ͬ���Ǹ�����ִ�й����У��õ���fork����ֵΪ�ӽ��� �ţ����ӽ��̵õ�����0��
  • setthreadtitle() - Set the thread title