Jon Ribbens <[EMAIL PROTECTED]> writes:

> Niels M�ller <[EMAIL PROTECTED]> wrote:
> > It is also possible to include a copy of openpty from glibc, and let
> > AC_REPLACE_FUNC use that if it is not provided by the system. (I can't
> > find openpty() in my copy of the glibc manual, so I don't know what it
> > does exactly).
> 
> OpenBSD has a openpty function. I don't know if it is similar to the
> glibc one:

Thanks.

>      The openpty() function finds an available pseudo-tty and returns file de-
>      scriptors for the master and slave in amaster and aslave. If name is non-
>      null, the filename of the slave is returned in name. If termp is non-
>      null, the terminal parameters of the slave will be set to the values in
>      termp. If winp is non-null, the window size of the slave will be set to
>      the values in winp.

Sound useful.

>      The login_tty() function prepares for a login on the tty fd (which may be
>      a real tty device, or the slave of a pseudo-tty as returned by openpty())
>      by creating a new session, making fd the controlling terminal for the
>      current process, setting fd to be the standard input, output, and error
>      streams of the current process, and closing fd.

Too bad that it sets stderr to the pty. But perhaps it can be hacked not to
touch stderr.

/Niels

Reply via email to