Provided by: manpages-fr-dev_4.13-4_all bug

NOM

       grantpt - Donner accès à un pseudoterminal esclave

SYNOPSIS

       #include <stdlib.h>

       int grantpt(int fd);

   Exigences de macros de test de fonctionnalités pour la glibc (consulter feature_test_macros(7)) :

       grantpt():
           Since glibc 2.24:
               _XOPEN_SOURCE >= 500 ||
                   (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED)
           Glibc 2.23 and earlier:
               _XOPEN_SOURCE

DESCRIPTION

       The  grantpt()   function  changes the mode and owner of the slave pseudoterminal device corresponding to
       the master pseudoterminal referred to by the file descriptor fd. 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., tty). The mode of the
       slave is set to 0620 (crw--w----).

       Le  comportement  de  grantpt()  est  indéterminé si un gestionnaire de signal est installé pour capturer
       SIGCHLD.

VALEUR RENVOYÉE

       Lorsqu'elle réussit, la fonction grantpt() renvoie 0. Sinon, elle renvoie -1 et errno est positionnée  en
       conséquence.

ERREURS

       EACCES Le pseudoterminal esclave n'est pas accessible.

       EBADF  L'argument fd n'est pas un descripteur valable.

       EINVAL L'argument fd est un descripteur mais pas associé avec un pseudoterminal maître.

VERSIONS

       grantpt() est fournie par la glibc depuis la version 2.1.

ATTRIBUTS

       Pour une explication des termes utilisés dans cette section, consulter attributes(7).
       ┌───────────┬──────────────────────┬────────────────┐
       │ InterfaceAttributValeur         │
       ├───────────┼──────────────────────┼────────────────┤
       │ grantpt() │ Sécurité des threads │ MT-Safe locale │
       └───────────┴──────────────────────┴────────────────┘

CONFORMITÉ

       POSIX.1-2001, POSIX.1-2008.

NOTES

       This is part of the UNIX 98 pseudoterminal support, see pts(4).

       Many  systems implement this function via a set-user-ID helper binary called "pt_chown". On Linux systems
       with a devpts filesystem (present since Linux 2.2), the kernel normally sets the  correct  ownership  and
       permissions  for  the  pseudoterminal  slave when the master is opened (posix_openpt(3)), so that nothing
       must be done by grantpt(). Thus, no such helper binary is required (and indeed it  is  configured  to  be
       absent during the glibc build that is typical on many systems).

VOIR AUSSI

       open(2), posix_openpt(3), ptsname(3), unlockpt(3), pts(4), pty(7)

COLOPHON

       Cette page fait partie de la publication 5.10 du projet man-pages Linux. Une description du projet et des
       instructions  pour  signaler  des  anomalies et la dernière version de cette page peuvent être trouvées à
       l'adresse https://www.kernel.org/doc/man-pages/.

TRADUCTION

       La  traduction  française   de   cette   page   de   manuel   a   été   créée   par   Christophe   Blaess
       <https://www.blaess.fr/christophe/>,   Stéphan   Rafin   <stephan.rafin@laposte.net>,   Thierry   Vignaud
       <tvignaud@mandriva.com>, François Micaux, Alain Portal  <aportal@univ-montp2.fr>,  Jean-Philippe  Guérard
       <fevrier@tigreraye.org>,   Jean-Luc   Coulon   (f5ibh)   <jean-luc.coulon@wanadoo.fr>,   Julien   Cristau
       <jcristau@debian.org>,     Thomas     Huriaux      <thomas.huriaux@gmail.com>,      Nicolas      François
       <nicolas.francois@centraliens.net>,     Florentin     Duneau    <fduneau@gmail.com>,    Simon    Paillard
       <simon.paillard@resel.enst-bretagne.fr>,   Denis   Barbier   <barbier@debian.org>   et    David    Prévot
       <david@tilapin.org>

       Cette  traduction  est  une  documentation libre ; veuillez vous reporter à la GNU General Public License
       version 3 concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE.

       Si vous découvrez un bogue dans la traduction de cette page de manuel,  veuillez  envoyer  un  message  à
       debian-l10n-french@lists.debian.org.

GNU                                             15 septembre 2017                                     GRANTPT(3)