.\" -*- coding: UTF-8 -*- '\" t .\" %%%LICENSE_START(PUBLIC_DOMAIN) .\" This page is in the public domain. - aeb .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH grantpt 3 "20 июля 2023 г." "Linux man\-pages 6.05.01" .SH ИМЯ grantpt \- разрешает доступ для подчинённому псевдотерминалу .SH LIBRARY Standard C library (\fIlibc\fP, \fI\-lc\fP) .SH СИНТАКСИС .nf \fB#include \fP .PP \fBint grantpt(int \fP\fIfd\fP\fB);\fP .fi .PP .RS -4 Требования макроса тестирования свойств для glibc (см. \fBfeature_test_macros\fP(7)): .RE .PP \fBgrantpt\fP(): .nf .\" || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) Начиная с glibc 2.24: _XOPEN_SOURCE >= 500 В версии glibc 2.23 и более ранних: _XOPEN_SOURCE .fi .SH ОПИСАНИЕ The \fBgrantpt\fP() function changes the mode and owner of the slave pseudoterminal device corresponding to the master pseudoterminal referred to by the file descriptor \fIfd\fP. The user ID of the slave is set to the real UID of the calling process. The group ID is set to an unspecified value (e.g., \fItty\fP). The mode of the slave is set to 0620 (crw\-\-w\-\-\-\-). .PP Поведение \fBgrantpt\fP() не определено, если установлен обработчик сигналов для перехвата сигналов \fBSIGCHLD\fP. .SH "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" When successful, \fBgrantpt\fP() returns 0. Otherwise, it returns \-1 and sets \fIerrno\fP to indicate the error. .SH ОШИБКИ .TP \fBEACCES\fP Невозможно получить доступ к соответствующему подчинённому псевдотерминалу. .TP \fBEBADF\fP Аргумент \fIfd\fP не является правильным открытым файловым дескриптором. .TP \fBEINVAL\fP Значение \fIfd\fP корректно, но не связано с основным псевдотерминалом. .SH АТРИБУТЫ Описание терминов данного раздела смотрите в \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Интерфейс Атрибут Значение T{ .na .nh \fBgrantpt\fP() T} Безвредность в нитях MT\-Safe locale .TE .sp 1 .SH СТАНДАРТЫ POSIX.1\-2008. .SH ИСТОРИЯ glibc 2.1. POSIX.1\-2001. .PP Является частью поддержки псевдотерминалов UNIX 98 (смотрите \fBpts\fP(4)). .PP Historical systems implemented this function via a set\-user\-ID helper binary called "pt_chown". glibc on Linux before glibc 2.33 could do so as well, in order to support configurations with only BSD pseudoterminals; this support has been removed. On modern systems this is either a no\-op \[em]with permissions configured on pty allocation, as is the case on Linux\[em] or an \fBioctl\fP(2). .SH "СМ. ТАКЖЕ" \fBopen\fP(2), \fBposix_openpt\fP(3), \fBptsname\fP(3), \fBunlockpt\fP(3), \fBpts\fP(4), \fBpty\fP(7) .PP .SH ПЕРЕВОД Русский перевод этой страницы руководства был сделан Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , 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 .