pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/56936: posix_openpt(O_RDWR | O_NOCTTY) fails when configuring pkgsrc/x11/mlterm



The following reply was made to PR pkg/56936; it has been noted by GNATS.

From: "David H. Gutteridge" <david%gutteridge.ca@localhost>
To: Gnats Bugs <gnats-bugs%netbsd.org@localhost>, dholland-pbugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/56936: posix_openpt(O_RDWR | O_NOCTTY) fails when configuring
 pkgsrc/x11/mlterm
Date: Wed, 07 Sep 2022 17:33:46 -0400

 On Tue, 6 Sep 2022 at 22:50:02 +0000 (UTC), David Holland wrote:
 > CONFIGURE_ENV+=ac_cv_mumble=yes if NetBSD is the most expedient way.
 
 It seems "CONFIGURE_ENV+= bl_cv_pty=streams" was already tried:
 
 http://mail-index.netbsd.org/netbsd-users/2022/07/22/msg028743.html
 
 I don't follow why it was reported as not working, as it worked for me
 in my sandboxed environment. (I see now the reporter was using a
 sandbox, too.) With that, I end up with mlterm using posix_openpt(3).
 
 > What does it fall back to? openpty(3) ought to work correctly whether
 > or not ptyfs is present. (And why doesn't posix_openpt?)
 
 It falls back to its own home-rolled "open_pty" function, which
 ultimately does
 
 if ((*master = open(name, O_RDWR, 0)) == -1)
 
 following its own hard-coded list of "old-style" BSD ptys.
 
 Inside a sandbox, I went as far as ktracing the posix_openpt(3) call,
 which results in:
    1963      1 open_test2 CALL  open(0x400b7e,0,0x7f7fff5f3328)
    1963      1 open_test2 NAMI  "/dev/ptmx"
    1963      1 open_test2 RET   open -1 errno 45 Operation not supported
 
 Inside a sandbox, openpty(3) also doesn't work, as I'd noticed since
 script(1) fails to work in that context.
 
 script: openpty: No such file or directory
 
   22686      1 script   CALL  open(0x6fd6ee21228c,2,0)
   22686      1 script   NAMI  "/dev/ptm"
   22686      1 script   RET   open 4
   22686      1 script   CALL  ioctl(4,TIOCPTMGET,0x7f7fffd49b00)
   22686      1 script   RET   ioctl -1 errno 45 Operation not supported
 
 Dave
 


Home | Main Index | Thread Index | Old Index