.. SPDX-License-Identifier: GPL-2.0=====================The Devpts Filesystem=====================Each mount of the devpts filesystem is now distinct such that ptysand their indicies allocated in one mount are independent from ptysand their indicies in all other mounts.All mounts of the devpts filesystem now create a ``/dev/pts/ptmx`` nodewith permissions ``0000``.To retain backwards compatibility the a ptmx device node (aka any nodecreated with ``mknod name c 5 2``) when opened will look for an instanceof devpts under the name ``pts`` in the same directory as the ptmx devicenode.As an option instead of placing a ``/dev/ptmx`` device node at ``/dev/ptmx``it is possible to place a symlink to ``/dev/pts/ptmx`` at ``/dev/ptmx`` orto bind mount ``/dev/ptx/ptmx`` to ``/dev/ptmx``. If you opt for usingthe devpts filesystem in this manner devpts should be mounted withthe ``ptmxmode=0666``, or ``chmod 0666 /dev/pts/ptmx`` should be called.Total count of pty pairs in all instances is limited by sysctls:: kernel.pty.max = 4096 - global limit kernel.pty.reserve = 1024 - reserved for filesystems mounted from the initial mount namespace kernel.pty.nr - current count of ptysPer-instance limit could be set by adding mount option ``max=<count>``.This feature was added in kernel 3.4 together with``sysctl kernel.pty.reserve``.In kernels older than 3.4 sysctl ``kernel.pty.max`` works as per-instance limit.