search for more ptys... this helps with FreeBSD, where ptypf is not the last

terminal (ptypv is)

svn path=/trunk/kdebase/konsole/; revision=56734
wilder-portage
bhughes 26 years ago
parent a293e3c7dd
commit 1f4ec476fd
  1. 4
      src/TEPty.C

@ -278,8 +278,8 @@ int TEPty::openPty()
}
#endif
if (ptyfd < 0) // Linux, FIXME: Trouble on other systems?
{ for (const char* s3 = "pqrstuvwxyzabcde"; *s3 != 0; s3++)
{ for (const char* s4 = "0123456789abcdef"; *s4 != 0; s4++)
{ for (const char* s3 = "pqrstuvwxyzabcdefghijklmno"; *s3 != 0; s3++)
{ for (const char* s4 = "0123456789abcdefghijklmnopqrstuvwxyz"; *s4 != 0; s4++)
{ sprintf(ptynam,"/dev/pty%c%c",*s3,*s4);
sprintf(ttynam,"/dev/tty%c%c",*s3,*s4);
if ((ptyfd = open(ptynam,O_RDWR)) >= 0)

Loading…
Cancel
Save