From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35221 invoked by alias); 15 Mar 2018 14:03:02 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 34448 invoked by uid 89); 15 Mar 2018 14:03:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=entitled X-HELO: mailbackend.panix.com X-Gm-Message-State: AElRT7E/b8a2uSyPbt2QK6aia1pQ4TRbtKWHK40xnJ0qT17VtjgPiYcL 30fyYB002IKVMF4EmVXBSvALpfv1KZJ/VZ37jyg= X-Google-Smtp-Source: AG47ELuZiP34UShGdmkm+Asy6ZYzA44brtR10DFpjt3kR9hS8BUGbtLUZnLhHDWRC3IjgatQ4+z3z3coApFEvXzlc4A= X-Received: by 10.202.215.138 with SMTP id o132mr5044106oig.181.1521122577204; Thu, 15 Mar 2018 07:02:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180315120651.14107-1-christian.brauner@ubuntu.com> References: <20180315120651.14107-1-christian.brauner@ubuntu.com> From: Zack Weinberg Date: Thu, 15 Mar 2018 14:03:00 -0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] getpt: use /dev/pts/ptmx as default ptmx master To: Christian Brauner Cc: ebiederm@xmission.com, GNU C Library Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-03/txt/msg00365.txt.bz2 On Thu, Mar 15, 2018 at 8:06 AM, Christian Brauner wrote: > For a long time now Linux has placed the ptmx character device directly > under the devpts mount at /dev/pts/ptmx. Exactly which kernel version started doing this? > It is time to start switching to using /dev/pts/ptmx and use /dev/ptmx as a > fallback only. Application code is entitled to do open ('/dev/ptmx", O_RDWR) itself rather than calling posix_openpt. It is not OK to break those applications. That was the recommended practice prior to the introduction of posix_openpt, and I am suspicious of posix_openpt not existing on still-reasonable portability targets. Since /dev/ptmx must stick around for the sake of those applications, I am inclined to say that libc's posix_openpt should continue using /dev/ptmx as well, in order to ensure that that configuration continues to be tested. I am also inclined to say that, on new kernels where the devpts filesystem provides the ptmx node, using a bind-mount rather than a symlink for /dev/ptmx is a misconfiguration (and on older kernels, obviously it needs to be an actual device node). zw