.\" -*- coding: UTF-8 -*- .\" This manpage is Copyright (C) 1992 Drew Eckhardt; .\" and Copyright (C) 1993 Michael Haardt, Ian Jackson. .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified Wed Jul 21 23:02:38 1993 by Rik Faith .\" Modified 2001-11-17, aeb .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH _EXIT 2 "9 февраля 2020 г." Linux "Руководство программиста Linux" .SH ИМЯ _exit, _Exit \- завершает вызывающий процесс .SH СИНТАКСИС \fB#include \fP .PP \fBvoid _exit(int \fP\fIstatus\fP\fB);\fP \fB#include \fP .PP \fBvoid _Exit(int \fP\fIstatus\fP\fB);\fP .PP .RS -4 Требования макроса тестирования свойств для glibc (см. \fBfeature_test_macros\fP(7)): .RE .PP .ad l \fB_Exit\fP(): .RS 4 _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L .RE .ad .SH ОПИСАНИЕ \fB_exit\fP() «безотлагательно» завершает вызывающий процесс. Все открытые дескрипторы файлов, принадлежащие процессу, закрываются. Все его дочерние процессы наследуются \fBinit\fP(1) (или ближайшим «собирающим» процессом, определённым вызовом \fBprctl\fP(2) с операцией \fBPR_SET_CHILD_SUBREAPER\fP).Родительскому процессу посылается сигнал \fBSIGCHLD\fP. .PP The value \fIstatus & 0xFF\fP is returned to the parent process as the process's exit status, and can be collected by the parent using one of the \fBwait\fP(2) family of calls. .PP Функция \fB_Exit\fP() эквивалентна \fB_exit\fP(). .SH "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" Эти функции не выполняют возврат. .SH "СООТВЕТСТВИЕ СТАНДАРТАМ" POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD. Функция \fB_Exit\fP() была представлена в C99. .SH ЗАМЕЧАНИЯ Обсуждение эффектов при завершении работы, передачу кода выхода, зомби\-процессы, сигналы и т. п., смотрите в \fBexit\fP(3). .PP Функция \fB_exit\fP() подобна \fBexit\fP(3), но не вызывает никаких функций, зарегистрированных с помощью \fBatexit\fP(3) или \fBon_exit\fP(3). Открытые потоки посредством \fBstdio\fP(3) не сбрасываются. С другой стороны, \fB_exit\fP() закрывает открытые дескрипторы файлов, а это может привести к неопределенной задержке, так как происходит ожидание завершения вывода данных. Если задержка нежелательна, то может быть полезным перед вызовом \fB_exit\fP() вызывать функцию типа \fBtcflush\fP(3). Будет ли отмена ожидания ввод\-вывода, а также какие именно ожидающие операции ввода\-вывода будут завершены при вызове \fB_exit\fP, зависит от реализации. .SS "Отличия между библиотекой C и ядром" In glibc up to version 2.3, the \fB_exit\fP() wrapper function invoked the kernel system call of the same name. Since glibc 2.3, the wrapper function invokes \fBexit_group\fP(2), in order to terminate all of the threads in a process. (The raw \fB_exit\fP() system call terminates only the calling thread.) .SH "СМ. ТАКЖЕ" \fBexecve\fP(2), \fBexit_group\fP(2), \fBfork\fP(2), \fBkill\fP(2), \fBwait\fP(2), \fBwait4\fP(2), \fBwaitpid\fP(2), \fBatexit\fP(3), \fBexit\fP(3), \fBon_exit\fP(3), \fBtermios\fP(3) .SH ЗАМЕЧАНИЯ Эта страница является частью проекта Linux \fIman\-pages\fP версии 5.10. Описание проекта, информацию об ошибках и последнюю версию этой страницы можно найти по адресу \%https://www.kernel.org/doc/man\-pages/. .PP .SH ПЕРЕВОД Русский перевод этой страницы руководства был сделан Yuri Kozlov . .PP Этот перевод является бесплатной документацией; прочитайте .UR https://www.gnu.org/licenses/gpl-3.0.html Стандартную общественную лицензию GNU версии 3 .UE или более позднюю, чтобы узнать об условиях авторского права. Мы не несем НИКАКОЙ ОТВЕТСТВЕННОСТИ. .PP Если вы обнаружите ошибки в переводе этой страницы руководства, пожалуйста, отправьте электронное письмо на .MT man-pages-ru-talks@lists.sourceforge.net .ME .