[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [beta-patch]UNIX98 pts support
From:       Gioele Barabucci <ml () gioelebarabucci ! com>
Date:       2001-11-30 22:12:11
[Download RAW message or body]

Maybe someone rebember the problems I had using konsole in a UNIX98 pts 
environment.
After a bit of hack I solved it in this way:

I added
#if defined (HAVE_OPENPTY)
        #include <pty.h>
#endif

and modified then #if defined (HAVE_OPENPTY) #endif block in

#if defined (HAVE_OPENPTY) //FIXME: some other work needed.
#warning Compiling with "openpty" support! Might break on some sistems!
  if (ptyfd < 0) {
    int master_fd, slave_fd;
    if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) == 0) {
      ptyfd = master_fd;
      strncpy(ptynam, ptsname(master_fd), 50);
      strncpy(ttynam, ttyname(slave_fd), 50);
      // one needs to look into who owns what to make sure chownpty is needed
    }
  }
#endif

now it need other 2 things:
  1) A configure.in test which define HAVE_OPENPTY

  2) a solution for the error 
    "konsole: chownpty failed for device /dev/pts/2::/dev/pts/2"
    which derives from
    "konsole_grantpty: determined a strange device name `/dev/ptmx'."

  3) a explaination for this behavoir:
    ls -l /dev/pts
    crw-r-----    1 gioele   tape     136,   2 nov 30 22:53 2
    crw--w----    1 gioele   tty      136,   3 nov 30 22:53 3
  Why does konsole chown to gioele:tape while xterm correctly chown to
  gioele:tty?


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic