|
|
1.1 ! root 1: /* ! 2: testty is a c function that determines whether or not ! 3: a file descriptor represents a tty device. testty ! 4: returns 0 on success, -1 on failure. ! 5: */ ! 6: #include <sgtty.h> ! 7: ! 8: int testty( fd ) ! 9: int fd; ! 10: ! 11: { ! 12: struct sgttyb buffer; ! 13: ! 14: return ioctl( fd,TIOCGETP,&buffer ); ! 15: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.