Changeset 4341a9e214fe728d919aff0399b82d39566ef844

Show
Ignore:
Timestamp:
06/22/08 16:54:05 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1214153645 +0000
git-parent:

[5b8a066e6456fa22d6ef41c1b4078189e356b3ee]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1214153645 +0000
Message:

make the console work on solaris -- trixie... backwards. refs #32

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_console.c

    r4c963d7 r4341a9e  
    272272int 
    273273allocate_pty(int *master, int *slave) { 
     274  long on = 1; 
    274275#ifdef HAVE_OPENPTY 
    275276  if(openpty(master, slave, NULL, NULL, NULL)) return -1; 
    276   if(ioctl(ncct->pty_master, FIONBIO, &on)) return -1; 
    277277#else 
    278278  /* STREAMS... sigh */ 
     
    291291    return -1; 
    292292  } 
    293   ioctl(*slave, I_PUSH, "ptem");       /* push ptem */ 
    294   ioctl(*slave, I_PUSH, "ldterm");     /* push ldterm*/ 
     293  /* This is a bit backwards as we using the PTY backwards. 
     294   * We want to make the master a tty instead of the slave... odd, I know. 
     295   */ 
     296  ioctl(*master, I_PUSH, "ptem");       /* push ptem */ 
     297  ioctl(*master, I_PUSH, "ldterm");     /* push ldterm*/ 
     298#endif 
     299  if(ioctl(*master, FIONBIO, &on)) return -1; 
     300  noitL(noit_debug, "allocate_pty -> %d,%d\n", *master, *slave); 
    295301  return 0; 
    296 #endif 
    297302} 
    298303