php-doc-en/reference/proctitle/functions/setproctitle.xml
2015-04-18 02:57:45 +00:00

100 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.setproctitle" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>setproctitle</refname>
<refpurpose>Set the process title</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>setproctitle</methodname>
<methodparam><type>string</type><parameter>title</parameter></methodparam>
</methodsynopsis>
<para>
Sets the process title of the current process.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>title</parameter></term>
<listitem>
<para>
The title to use as the process title.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples"><!-- {{{ -->
&reftitle.examples;
<example xml:id="setproctitle.example.basic"><!-- {{{ -->
<title><function>setproctitle</function> example</title>
<para>
Running the example below will change the process title (visible with
<literal>ps a</literal> for example).
</para>
<programlisting role="php">
<![CDATA[
<?php
setproctitle("myscript");
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
$ ps a
PID TTY STAT TIME COMMAND
1168 pts/3 S 0:00 myscript
]]>
</screen>
</example><!-- }}} -->
</refsect1><!-- }}} -->
<refsect1 role="seealso"><!-- {{{ -->
&reftitle.seealso;
<simplelist>
<member><function>cli_set_process_title</function></member>
<member><function>pcntl_fork</function></member>
<member><function>setthreadtitle</function></member>
</simplelist>
</refsect1><!-- }}} -->
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->