mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 18:38:55 +00:00
549 lines
17 KiB
Text
549 lines
17 KiB
Text
![]() |
<reference id="ref.posix">
|
||
|
<title>POSIX functions</title>
|
||
|
<titleabbrev>POSIX</titleabbrev>
|
||
|
|
||
|
<refentry id="function.posix-kill">
|
||
|
<refnamediv>
|
||
|
<refname>posix_kill</refname>
|
||
|
<refpurpose>send a signal to a process</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>bool <function>posix_kill</function></funcdef>
|
||
|
<paramdef>int <parameter>pid</parameter>
|
||
|
int <parameter>sig</paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Send the signal <parameter>sig</parameter> to the process
|
||
|
with the process identifier <parameter>pid</parameter>.
|
||
|
Returns FALSE, if unable to send the signal, TRUE otherwise.
|
||
|
<para>
|
||
|
See also the kill(2) manual page of your POSIX system, which
|
||
|
contains additional information about negative process identifiers,
|
||
|
the special pid 0, the special pid -1, and the signal number 0.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getpid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getpid</refname>
|
||
|
<refpurpose>return the current process identifier</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_getpid</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Return the process identifier of the current process.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getppid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getppid</refname>
|
||
|
<refpurpose>return the parent process identifier</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_getppid</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Return the process identifier of parent process of the current process.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getuid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getuid</refname>
|
||
|
<refpurpose>return the real user ID of the current process</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_getuid</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Return the numeric real user ID of the current process. See also
|
||
|
<function>posix_getpwuid</function> for information on how to
|
||
|
convert this into a useable username.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-geteuid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_geteuid</refname>
|
||
|
<refpurpose>return the effective user ID of the current process</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_geteuid</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Return the numeric effective user ID of the current process. See also
|
||
|
<function>posix_getpwuid</function> for information on how to
|
||
|
convert this into a useable username.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getgid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getgid</refname>
|
||
|
<refpurpose>return the real group ID of the current process</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_getgid</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Return the numeric real group ID of the current process. See also
|
||
|
<function>posix_getgrgid</function> for information on how to
|
||
|
convert this into a useable group name.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getegid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getegid</refname>
|
||
|
<refpurpose>return the effective group ID of the current process</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_getegid</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Return the numeric effective group ID of the current process. See also
|
||
|
<function>posix_getgrgid</function> for information on how to
|
||
|
convert this into a useable group name.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-setuid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_setuid</refname>
|
||
|
<refpurpose>Set the effective UID of the current process</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>bool <function>posix_setuid</function></funcdef>
|
||
|
<paramdef>int <parameter>uid</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Set the real user ID of the current process. This is a privileged
|
||
|
function and you need appropriate privileges (usually root) on
|
||
|
your system to be able to perform this function.
|
||
|
<para>
|
||
|
Returns TRUE on success, FALSE otherwise. See also
|
||
|
<function>posix_setgid</function>.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-setgid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_setgid</refname>
|
||
|
<refpurpose>Set the effective GID of the current process</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>bool <function>posix_setgid</function></funcdef>
|
||
|
<paramdef>int <parameter>gid</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Set the real group ID of the current process. This is a privileged
|
||
|
function and you need appropriate privileges (usually root) on
|
||
|
your system to be able to perform this function. The appropriate
|
||
|
order of function calls is <function>posix_setgid</function> first,
|
||
|
<function>posix_setuid</function> last.
|
||
|
<para>
|
||
|
Returns TRUE on success, FALSE otherwise.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getgroups">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getgroups</refname>
|
||
|
<refpurpose>return the group set of the current process</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>array <function>posix_getgroups</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Returns an array of integers containing the numeric group ids of the
|
||
|
group set of the current process. See also
|
||
|
<function>posix_getgrgid</function> for information on how to convert
|
||
|
this into useable group names.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getlogin">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getlogin</refname>
|
||
|
<refpurpose>return login name</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>string <function>posix_getlogin</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Returns the login name of the user owning the current process.
|
||
|
See <function>posix_getpwnam</function> for information how to
|
||
|
get more information about this user.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getpgrp">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getpgrp</refname>
|
||
|
<refpurpose>return the current process group identifier</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_getpgrp</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Return the process group identifier of the current process. See
|
||
|
POSIX.1 and the getpgrp(2) manual page on your POSIX system for
|
||
|
more information on process groups.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-setsid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_setsid</refname>
|
||
|
<refpurpose>make the current process a session leader</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_setsid</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Make the current process a session leader. See POSIX.1 and
|
||
|
the setsid(2) manual page on your POSIX system for more
|
||
|
informations on process groups and job control. Returns
|
||
|
the session id.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-setpgid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_setpgid</refname>
|
||
|
<refpurpose>set process group id for job control</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_setpgid</function></funcdef>
|
||
|
<paramdef>int <parameter>pid</parameter>
|
||
|
int <parameter>pgid</paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Let the process <parameter>pid</parameter> join the process
|
||
|
group <parameter>pgid</parameter>. See POSIX.1 and
|
||
|
the setsid(2) manual page on your POSIX system for more
|
||
|
informations on process groups and job control. Returns
|
||
|
TRUE on success, FALSE otherwise.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getpgid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getpgid</refname>
|
||
|
<refpurpose>get process group id for job control</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_getpgid</function></funcdef>
|
||
|
<paramdef>int <parameter>pid</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Returns the process group identifier of the process
|
||
|
<parameter>pid</parameter>.
|
||
|
<para>
|
||
|
This is not a POSIX function, but is common on BSD and System V
|
||
|
systems. If your system does not support this function at system level,
|
||
|
this PHP function will always return FALSE.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getsid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_setsid</refname>
|
||
|
<refpurpose>get the current sid of the process</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>int <function>posix_getsid</function></funcdef>
|
||
|
<paramdef>int <parameter>pid</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Return the sid of the process <parameter>pid</parameter>.
|
||
|
If <parameter>pid</parameter> is 0, the sid of the
|
||
|
current process is returned.
|
||
|
<para>
|
||
|
This is not a POSIX function, but is common on System V
|
||
|
systems. If your system does not support this function at system level,
|
||
|
this PHP function will always return FALSE.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-uname">
|
||
|
<refnamediv>
|
||
|
<refname>posix_uname</refname>
|
||
|
<refpurpose>get system name</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>array <function>posix_uname</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Returns a hash of strings with information about the
|
||
|
system. The indices of the hash are
|
||
|
<itemizedlist>
|
||
|
<listitem><simpara>
|
||
|
sysname - operating system name (e.g. Linux)
|
||
|
</simpara></listitem>
|
||
|
<listitem><simpara>
|
||
|
nodename - system name (e.g. valiant)
|
||
|
</simpara></listitem>
|
||
|
<listitem><simpara>
|
||
|
release - operating system release (e.g. 2.2.10)
|
||
|
</simpara></listitem>
|
||
|
<listitem><simpara>
|
||
|
version - operating system version (e.g. #4 Tue Jul 20 17:01:36 MEST 1999)
|
||
|
</simpara></listitem>
|
||
|
<listitem><simpara>
|
||
|
machine - system architecture (e.g. i586)
|
||
|
</simpara></listitem>
|
||
|
</itemizedlist>
|
||
|
|
||
|
Posix requires that you must not make any assumptions about
|
||
|
the format of the values, e.g. you cannot rely on three digit
|
||
|
version numbers or anything else returned by this function.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-times">
|
||
|
<refnamediv>
|
||
|
<refname>posix_times</refname>
|
||
|
<refpurpose>get process times</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>array <function>posix_times</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Returns a hash of strings with information about the
|
||
|
current process CPU usage. The indices of the hash are
|
||
|
<itemizedlist>
|
||
|
<listitem><simpara>
|
||
|
ticks - the number of clock ticks that have elapsed since reboot.
|
||
|
</simpara></listitem>
|
||
|
<listitem><simpara>
|
||
|
utime - user time used by the current process.
|
||
|
</simpara></listitem>
|
||
|
<listitem><simpara>
|
||
|
stime - system time used by the current process.
|
||
|
</simpara></listitem>
|
||
|
<listitem><simpara>
|
||
|
cutime - user time used by current process and children.
|
||
|
</simpara></listitem>
|
||
|
<listitem><simpara>
|
||
|
cstime - system time used by current process and children.
|
||
|
</simpara></listitem>
|
||
|
</itemizedlist>
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-ctermid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_ctermid</refname>
|
||
|
<refpurpose>get path name of controlling terminal</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>string <function>posix_ctermid</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-ttyname">
|
||
|
<refnamediv>
|
||
|
<refname>posix_ttyname</refname>
|
||
|
<refpurpose>determine terminal device name</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>string <function>posix_ttyname</function></funcdef>
|
||
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-isatty">
|
||
|
<refnamediv>
|
||
|
<refname>posix_isatty</refname>
|
||
|
<refpurpose>determine if a file descriptor is an interactive terminal</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>bool <function>posix_isatty</function></funcdef>
|
||
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getcwd">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getcwd</refname>
|
||
|
<refpurpose>pathname of current directory</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>string <function>posix_getcwd</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-mkfifo">
|
||
|
<refnamediv>
|
||
|
<refname>posix_mkfifo</refname>
|
||
|
<refpurpose>create a fifo special file (a named pipe)</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>bool <function>posix_getcwd</function></funcdef>
|
||
|
<paramdef>string <parameter>pathname</parameter>
|
||
|
int <parameter>mode</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getgrnam">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getgrnam</refname>
|
||
|
<refpurpose>return info about a group by name</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>array <function>posix_getgrnam</function></funcdef>
|
||
|
<paramdef>string <parameter>name</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getgrgid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getgrgid</refname>
|
||
|
<refpurpose>return info about a group by group id</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>array <function>posix_getgrgid</function></funcdef>
|
||
|
<paramdef>int <parameter>gid</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getpwnam">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getpwnam</refname>
|
||
|
<refpurpose>return info about a user by name</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>array <function>posix_getpwnam</function></funcdef>
|
||
|
<paramdef>string <parameter>name</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getpwuid">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getpwuid</refname>
|
||
|
<refpurpose>return info about a user by user id</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>array <function>posix_getpwuid</function></funcdef>
|
||
|
<paramdef>int <parameter>uid</parameter></paramdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<refentry id="function.posix-getrlimit">
|
||
|
<refnamediv>
|
||
|
<refname>posix_getrlimit</refname>
|
||
|
<refpurpose>return info about system ressource limits</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<funcsynopsis>
|
||
|
<funcdef>array <function>posix_getrlimit</function></funcdef>
|
||
|
</funcsynopsis>
|
||
|
<para>
|
||
|
Needs to be written.
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
</reference>
|
||
|
|
||
|
<!-- 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
|
||
|
sgml-parent-document:nil
|
||
|
sgml-default-dtd-file:"../manual.ced"
|
||
|
sgml-exposed-tags:nil
|
||
|
sgml-local-catalogs:nil
|
||
|
sgml-local-ecat-files:nil
|
||
|
End:
|
||
|
-->
|