Files
php-doc-ru/reference/posix/functions/posix-get-last-error.xml
Sergey Panteleev daef8df962 Обнуление тега Reviewed (#364)
[skip-lint]
[skip-spellcheck]
2021-11-16 13:03:53 +03:00

87 lines
2.8 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: f8854f6a6a7907720ed8ec8657a2f466a82c0394 Maintainer: rjhdby Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.posix-get-last-error" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>posix_get_last_error</refname>
<refpurpose>Возвращает номер ошибки, которая произошла в последней posix функции, завершившейся неудачей</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>posix_get_last_error</methodname>
<void />
</methodsynopsis>
<para>
Возвращает номер ошибки, произошедшей в последней posix функции,
завершившейся неудачей. Системное сообщение об ошибке, соответствующее
её номеру, может быть получено с помощью
<function>posix_strerror</function>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает номер ошибки, установленный последней posix функцией,
завершившейся неудачей. В случае отсутствия ошибок возвращает 0.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <function>posix_get_last_error</function></title>
<para>
В данном примере происходит попытка завершить несуществующий процесс по его id.
Попытка завершается неудачей и возвращает номер ошибки, который будет выведен.
</para>
<programlisting role="php">
<![CDATA[
<?php
posix_kill(999459,SIGKILL);
echo 'Your error returned was '.posix_get_last_error(); //Your error was ___
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>posix_strerror</function></member>
</simplelist>
</para>
</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
-->