mirror of
https://github.com/php/doc-es.git
synced 2026-03-24 07:22:16 +01:00
196 lines
5.4 KiB
XML
196 lines
5.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 4ecb2c1b4ba1b51c5e9678a7908e001df9bc92f5 Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.proc-nice" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>proc_nice</refname>
|
|
<refpurpose>Modifica la prioridad de ejecución del proceso actual</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>proc_nice</methodname>
|
|
<methodparam><type>int</type><parameter>priority</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>proc_nice</function> modifica la prioridad del proceso actual
|
|
mediante el argumento especificado <parameter>priority</parameter>.
|
|
Un argumento <parameter>priority</parameter> positivo reducirá la
|
|
prioridad del proceso actual, mientras que un valor negativo
|
|
<parameter>priority</parameter> aumentará la prioridad.
|
|
</para>
|
|
<para>
|
|
<function>proc_nice</function> no está relacionado con
|
|
<function>proc_open</function> ni con sus funciones asociadas de ninguna manera.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>priority</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El nuevo valor de prioridad, este valor puede variar según la plataforma.
|
|
</para>
|
|
<para>
|
|
En Unix, un valor bajo, como <literal>-20</literal> indica una prioridad alta, mientras que un valor positivo indica una prioridad baja.
|
|
</para>
|
|
<para>
|
|
Para Windows, el argumento <parameter>priority</parameter> tiene las
|
|
siguientes significaciones:
|
|
</para>
|
|
<informaltable>
|
|
<tgroup cols="3">
|
|
<thead>
|
|
<row>
|
|
<entry valign="top">Clase de prioridad</entry>
|
|
<entry valign="top">Valores posibles</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry valign="top">Prioridad alta</entry>
|
|
<entry valign="top">
|
|
<parameter>priority</parameter> <literal>< -9</literal>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry valign="top">Por encima de la prioridad normal</entry>
|
|
<entry valign="top">
|
|
<parameter>priority</parameter> <literal>< -4</literal>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry valign="top">Prioridad normal</entry>
|
|
<entry valign="top">
|
|
<parameter>priority</parameter> <literal>< 5</literal> &
|
|
<parameter>priority</parameter> <literal>> -5</literal>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry valign="top">Por debajo de la prioridad normal</entry>
|
|
<entry valign="top">
|
|
<parameter>priority</parameter> <literal>> 5</literal>
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry valign="top">Prioridad inactiva</entry>
|
|
<entry valign="top">
|
|
<parameter>priority</parameter> <literal>> 9</literal>
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
Si ocurre un error, por ejemplo, si el usuario que intenta cambiar la prioridad de un proceso no tiene
|
|
suficientes permisos para hacerlo, se genera un error de nivel
|
|
<constant>E_WARNING</constant> y se devuelve &false;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>7.2.0</entry>
|
|
<entry>
|
|
Esta función está ahora disponible en Windows.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Uso de <function>proc_nice</function> para establecer una prioridad de proceso alta</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Prioridad más alta
|
|
proc_nice(-20);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<title>Disponibilidad</title>
|
|
<para>
|
|
<function>proc_nice</function> solo está disponible en sistemas que
|
|
disponen de capacidades NICE. NICE es compatible con: SVr4, SVID EXT,
|
|
AT&T, X/OPEN, BSD 4.3.
|
|
</para>
|
|
</note>
|
|
<note>
|
|
<title>Solo Windows</title>
|
|
<para>
|
|
<function>proc_nice</function> cambiará la prioridad del <emphasis>proceso</emphasis>
|
|
actual incluso si PHP ha sido compilado utilizando la
|
|
seguridad de hilos.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><function>pcntl_setpriority</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
|
|
-->
|