|
|
1.1 ! root 1: .TH TTYNAME 3 ! 2: .CT 2 comm_term ! 3: .SH NAME ! 4: ttyname, isatty, nametty \(mi find or set name of a terminal ! 5: .SH SYNOPSIS ! 6: .B char *ttyname(fildes) ! 7: .PP ! 8: .B isatty(fildes) ! 9: .PP ! 10: .B nametty(fildes, file) ! 11: .br ! 12: .B char *file; ! 13: .SH DESCRIPTION ! 14: .I Ttyname ! 15: returns a pointer to the null-terminated path name ! 16: of the terminal device associated with file descriptor ! 17: .IR fildes . ! 18: .PP ! 19: .I Isatty ! 20: returns 1 if ! 21: .I fildes ! 22: is associated with a terminal device, ! 23: 0 otherwise. ! 24: .PP ! 25: .I Nametty ! 26: arranges that future opens of ! 27: .I file ! 28: will refer to ! 29: the stream opened on ! 30: .IR fildes . ! 31: .I File ! 32: must exist before ! 33: .I nametty ! 34: is called. ! 35: The arrangement is terminated ! 36: when the other end of the stream ! 37: is closed or hung up. ! 38: .SH FILES ! 39: .F /lib/ttydevs ! 40: list of tty directories for ! 41: .I ttyname ! 42: .SH SEE ALSO ! 43: .IR fmount (2), ! 44: .IR ioctl (2) ! 45: .SH DIAGNOSTICS ! 46: .I Ttyname ! 47: returns ! 48: .L NULL ! 49: if ! 50: .I fildes ! 51: does not describe an entry in any of the directories ! 52: listed in ! 53: .FR /lib/ttydevs . ! 54: .PP ! 55: .I Nametty ! 56: returns 1 for success, ! 57: 0 for failure ! 58: .RI ( file ! 59: does not exist, ! 60: .I fildes ! 61: is not a stream). ! 62: .SH BUGS ! 63: The return value of ! 64: .I ttyname ! 65: points to static data ! 66: whose content is overwritten by each call. ! 67: .br ! 68: If ! 69: .I fildes ! 70: is a network connection, ! 71: .I isatty ! 72: may produce answers having more to do with the network ! 73: than to the file to which network data is copied. ! 74: In particular, ! 75: it always returns no ! 76: for connections set up by ! 77: .IR rx , ! 78: and always returns yes for connections arranged by ! 79: .IR dcon ; ! 80: see ! 81: .IR con (1).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.