php-doc-en/reference/posix/constants.xml

405 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<appendix xml:id="posix.constants" xmlns="http://docbook.org/ns/docbook">
&reftitle.constants;
&extension.constants;
<section xml:id="posix.constants.access">
<title><function>posix_access</function> constants</title>
<note>
<para>
Please note that some of these constants may not be available on every system.
</para>
</note>
<variablelist>
<varlistentry xml:id="constant.posix-f-ok">
<term>
<constant>POSIX_F_OK</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Check whether the file exists.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-r-ok">
<term>
<constant>POSIX_R_OK</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Check whether the file exists and has read permissions.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-w-ok">
<term>
<constant>POSIX_W_OK</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Check whether the file exists and has write permissions.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-x-ok">
<term>
<constant>POSIX_X_OK</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Check whether the file exists and has execute permissions.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="posix.constants.mknod">
<title><function>posix_mknod</function> constants</title>
<note>
<para>
Please note that some of them may not be available on your system.
</para>
</note>
<variablelist>
<varlistentry xml:id="constant.posix-s-ifblk">
<term>
<constant>POSIX_S_IFBLK</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Block special file
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-s-ifchr">
<term>
<constant>POSIX_S_IFCHR</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Character special file
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-s-ififo">
<term>
<constant>POSIX_S_IFIFO</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
FIFO (named pipe) special file
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-s-ifreg">
<term>
<constant>POSIX_S_IFREG</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Normal file
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-s-ifsock">
<term>
<constant>POSIX_S_IFSOCK</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Socket
</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="posix.constants.setrlimit">
<title><function>posix_setrlimit</function> constants</title>
<note>
<para>
Please note that some of them may not be available on your system.
</para>
</note>
<note>
<para>
You may wish to read the below notes in conjunction with the manpage for
<function>setrlimit</function> on your specific operating system, as there
is variance in how these limits are interpreted, even across operating
systems that claim to implement POSIX in full.
</para>
</note>
<variablelist>
<varlistentry xml:id="constant.posix-rlimit-as">
<term>
<constant>POSIX_RLIMIT_AS</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum size of the process's address space in bytes. See also PHP's
<link linkend="ini.memory-limit">memory_limit</link> configuration
directive.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-core">
<term>
<constant>POSIX_RLIMIT_CORE</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum size of a core file. If the limit is set to 0, no core file
will be generated.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-cpu">
<term>
<constant>POSIX_RLIMIT_CPU</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum amount of CPU time that the process can use, in seconds.
When the soft limit is hit, a <literal>SIGXCPU</literal> signal will be
sent, which can be caught with <function>pcntl_signal</function>.
Depending on the operating system, additional <literal>SIGXCPU</literal>
signals may be sent each second until the hard limit is hit, at which
point an uncatchable <literal>SIGKILL</literal> signal is sent.
</simpara>
<simpara>
See also <function>set_time_limit</function>.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-data">
<term>
<constant>POSIX_RLIMIT_DATA</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum size of the process's data segment, in bytes. It is
extremely unlikely that this will have any effect on the execution of
PHP unless an extension is in use that calls <function>brk</function> or
<function>sbrk</function>.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-fsize">
<term>
<constant>POSIX_RLIMIT_FSIZE</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum size of files that the process can create, in bytes.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-locks">
<term>
<constant>POSIX_RLIMIT_LOCKS</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum number of locks that the process can create. This is only
supported on extremely old Linux kernels.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-memlock">
<term>
<constant>POSIX_RLIMIT_MEMLOCK</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum number of bytes that can be locked into memory.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-msgqueue">
<term>
<constant>POSIX_RLIMIT_MSGQUEUE</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum number of bytes that can be allocated for POSIX message
queues. PHP does not ship with support for POSIX message queues, so this
limit will not have any effect unless you are using an extension that
implements that support.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-nice">
<term>
<constant>POSIX_RLIMIT_NICE</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum value to which the process can be
<link linkend="function.pcntl-setpriority">reniced</link> to. The value
that will be used will be <literal>20 - limit</literal>, as resource
limit values cannot be negative.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-nofile">
<term>
<constant>POSIX_RLIMIT_NOFILE</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
A value one greater than the maximum file descriptor number that can be
opened by this process.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-nproc">
<term>
<constant>POSIX_RLIMIT_NPROC</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum number of processes (and/or threads, on some operating
systems) that can be created for the real user ID of the process.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-rss">
<term>
<constant>POSIX_RLIMIT_RSS</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum size of the process's resident set, in pages.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-rtprio">
<term>
<constant>POSIX_RLIMIT_RTPRIO</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum real time priority that can be set via the
<function>sched_setscheduler</function> and
<function>sched_setparam</function> system calls.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-rttime">
<term>
<constant>POSIX_RLIMIT_RTTIME</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum amount of CPU time, in microseconds, that the process can
consume without making a blocking system call if it is using real time
scheduling.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-sigpending">
<term>
<constant>POSIX_RLIMIT_SIGPENDING</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum number of signals that can be queued for the real user ID of
the process.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-stack">
<term>
<constant>POSIX_RLIMIT_STACK</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum size of the process stack, in bytes.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-infinity">
<term>
<constant>POSIX_RLIMIT_INFINITY</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Used to indicate an infinite value for a resource limit.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-kqueues">
<term>
<constant>POSIX_RLIMIT_KQUEUES</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum number of kqueues this user id is allowed to create (FreeBSD).
Available as of PHP 8.1.0.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.posix-rlimit-npts">
<term>
<constant>POSIX_RLIMIT_NPTS</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
The maximum number of pseudo-terminals this user id is allowed to create (FreeBSD).
Available as of PHP 8.1.0.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</section>
</appendix>
<!-- 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
-->