Push ptem and ldterm for STERAMS-based systems when allocating a pty.
This commit is contained in:
@@ -491,6 +491,9 @@
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stropts.h> header file. */
|
||||
#undef HAVE_SYS_STROPTS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
|
3
configure
vendored
3
configure
vendored
@@ -13989,7 +13989,8 @@ fi
|
||||
|
||||
|
||||
|
||||
for ac_header in malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h
|
||||
|
||||
for ac_header in malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
|
||||
|
@@ -1787,7 +1787,7 @@ dnl
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h)
|
||||
AC_CHECK_HEADERS(malloc.h paths.h utime.h netgroup.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h)
|
||||
dnl ultrix termio/termios are broken
|
||||
if test "$OS" != "ultrix"; then
|
||||
AC_SYS_POSIX_TERMIOS
|
||||
|
7
script.c
7
script.c
@@ -22,6 +22,9 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef HAVE_SYS_STROPTS_H
|
||||
#include <sys/stropts.h>
|
||||
#endif /* HAVE_SYS_STROPTS_H */
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif /* HAVE_SYS_SELECT_H */
|
||||
@@ -884,6 +887,10 @@ get_pty(master, slave)
|
||||
close(*master);
|
||||
return(0);
|
||||
}
|
||||
#ifdef I_PUSH
|
||||
ioctl(*slave, I_PUSH, "ptem"); /* pseudo tty emulation module */
|
||||
ioctl(*slave, I_PUSH, "ldterm"); /* line discipline module */
|
||||
#endif
|
||||
(void) chown(slavename, runas_pw->pw_uid, -1);
|
||||
return(1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user