Paul Slootman <[EMAIL PROTECTED]> typed:
: On Sat 30 Sep 2000, Geoff Wing wrote:
: It appears that "test -e" isn't standard; "-c" might be a better choice
: (I'm guessing /dev/ptym/clone is a character special device).
: After fixing this, it reports
: pty/tty type: GLIBC
: which makes me wonder a bit, I don't think solaris uses glibc...
: So, I'm basically lost at this point.
: Let me know if you want me to try anything.
Thanks, two patches follow. Both are now in CVS.
First patch should fix detection of pty type.
Second patch makes sure /dev/tty is reassociated with the tty (as
a controlling tty) when certain OS-specific ioctl()s aren't available.
Regards,
Geoff
Index: autoconf/configure.in
===================================================================
RCS file: /cvsroot/rxvt/rxvt/autoconf/configure.in,v
retrieving revision 1.105
diff -u -r1.105 configure.in
--- autoconf/configure.in 2001/03/23 06:15:36 1.105
+++ autoconf/configure.in 2001/04/01 07:45:54
@@ -896,15 +896,15 @@
rxvt_cv_ptys=SGI4
else if test -c /dev/ttyp20; then
rxvt_cv_ptys=SCO
- else if test -e /dev/ptym/clone; then
+ else if test -c /dev/ptym/clone; then
rxvt_cv_ptys=HPUX
- else if test x$ac_cv_func_grantpt = xyes; then
+ else if test x$ac_cv_func_getpt = xyes; then
rxvt_cv_ptys=GLIBC
else if test -c /dev/ptc -a -c /dev/pts; then
rxvt_cv_ptys=PTC
else if test -c /dev/ptmx -a -c /dev/pts/0; then
rxvt_cv_ptys=STREAMS
- else if test x$rxvt_cv_func_getpt = xyes && test x$ac_cv_func_unlockpt = xyes; then
+ else if test x$rxvt_cv_func_grantpt = xyes && test x$ac_cv_func_unlockpt = xyes; then
dnl# catch CYGWIN
rxvt_cv_ptys=STREAMS
else
Index: src/init.c
===================================================================
RCS file: /cvsroot/rxvt/rxvt/src/init.c,v
retrieving revision 1.69
diff -u -r1.69 init.c
--- src/init.c 2001/03/23 06:15:37 1.69
+++ src/init.c 2001/04/01 08:12:27
@@ -1137,6 +1137,12 @@
ioctl(r->tty_fd, TIOCSCTTY, 0);
# elif defined(TIOCSETCTTY)
ioctl(r->tty_fd, TIOCSETCTTY, 0);
+# else
+ fd = open(r->h->ttydev, O_RDWR);
+ if (fd < 0)
+ rxvt_print_error("trouble opening tty");
+ else
+ close(fd);
# endif
/* ---------------------------------------- */
fd = open("/dev/tty", O_WRONLY);
--
Geoff Wing : <[EMAIL PROTECTED]>
Rxvt Stuff : <[EMAIL PROTECTED]>
Zsh Stuff : <[EMAIL PROTECTED]>