|
|
1.1 ! root 1: /* ! 2: * Coherent I/O Library. ! 3: * Return the index of the entry in the ! 4: * `/etc/ttys' file for this process. ! 5: * Slot 0 is returned on error. ! 6: * [Note: the controlling terminal of the process ! 7: * is taken to be stderr]. ! 8: * We use fttyslot which returns -1 on error ! 9: * for the benefit of ttyname(). ! 10: */ ! 11: ! 12: int fttyslot(); /* In ttyname.c */ ! 13: ! 14: ttyslot() ! 15: { ! 16: register int slot; ! 17: ! 18: if ((slot = fttyslot(2)) < 0) ! 19: slot += 1; ! 20: return (slot); ! 21: } ! 22:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.