Req #33147 [Com]: proc_open(): "pty pseudo terminal not supported on this system"

From: Date: Sun, 08 Oct 2017 12:56:30 +0000
Subject: Req #33147 [Com]: proc_open(): "pty pseudo terminal not supported on this system"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211580@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=33147&edit=1

 ID:                 33147
 Comment by:         bwg at briangortney dot com
 Reported by:        skissane at iips dot mq dot edu dot au
 Summary:            proc_open(): "pty pseudo terminal not supported on
                     this system"
 Status:             Open
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   *
 PHP Version:        5CVS-2005-05-27
 Block user comment: N
 Private report:     N

 New Comment:

But aren't those comments irrelevant?  The patch adds the '--enable-pty' option,
which would leave it up to the user and/or distribution to enable pty support.  In cases where the
user or distro package manager knows Unix 98 ptys are supported, they can --enable-pty; otherwise,
nothing changes.  It doesn't seem it needs to be 'smarter' than that, to me.  At the
very least, allowing ptys to be used in this way, rather than just disabling entirely (#if 0), is a
step in the right direction.

I'm going to apply the patch to 7.1.10 (manually, I'm sure) and test this morning; will
post the diff (or a PR on github if that's preferred) if it still works.  Looks like it should?


Previous Comments:
------------------------------------------------------------------------
[2017-10-08 11:53:49] spam2 at rhsoft dot net

things like "open two terminal sessions and become root in them" in the existing comments
are hardly helpful because nobody ever should run

./configure
make test

as root and so whatever somebody proposes needs to work in a completly restricted environment and
must not fail in headless builds like distributions and everybody building packages for distribution
ones to override are using (sise open buildserver, Fedora koji)

------------------------------------------------------------------------
[2017-10-08 10:44:04] bwg at briangortney dot com

This appears to still be an issue?  There are legitimate uses for this, so not sure why it's
being ignored?  Looks like there's a patch, even.

------------------------------------------------------------------------
[2014-05-12 11:33:35] gescheit at list dot ru

Sadly, but "bug" still present.
This code can be used for pty checking:

#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <pty.h>

int main(int argc, char** argv) {
    int master;
    int slave;
    return openpty(&master,&slave,NULL,NULL,NULL);
}

------------------------------------------------------------------------
[2006-02-14 11:28:26] justinhead at insightbb dot com

You can use basic shell tools to test system pty piping.  The following works on FreeBSD 6.0 but you
may have to change the names of your pty/tty devices for other unixes.

Open up two terminal sessions and become root in both.

In the first one type:
ping localhost | tee /dev/ptyp9

In the second one type:
cat < /dev/ttyp9

Thats it.  If pty's are working you should start seeing the output of the ping command scroll
by in both terminals.

------------------------------------------------------------------------
[2005-07-14 08:57:44] sniper@php.net

I'm still waiting for someone to give me a short and reliable piece of code (shell or C) to
test if the functionality is present on the system..


------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=33147


--
Edit this bug report at https://bugs.php.net/bug.php?id=33147&edit=1


Thread (22 messages)

« previous php.bugs (#211580) next »