⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ttyslot.3

📁 操作系统设计与实现源码
💻 3
字号:
.TH TTYSLOT 3.SH NAMEttyslot, fttyslot \- utmp slot number.SH SYNOPSIS.nf.ft B#define _MINIX_SOURCE 1#include <unistd.h>int ttyslot(void)int fttyslot(int \fIfd\fP).fi.ft P.SH DESCRIPTION.B Ttyslot()returns the index of the login terminal in the.B utmpfile.  It tries.B fttyslot()on file descriptors.BR 0,.BR 1,and.BR 2to find the index..PP.B Fttyslot()returns the utmp index of the terminal associated with file descriptor.IR fd .First it tries to map.I fdto a terminal name with.BR ttyname (3),then it searches the.BR ttytab (5)database with the.BR getttyent (3)function for this terminal.  This means that the utmp slot number is thesame as the ttytab entry number counting from 1.  The value 0 is returned ifno slot number can be found for a file descriptor..SH "SEE ALSO".BR ttyname (3),.BR getttyent (3),.BR utmp (5),.BR ttytab (5),.BR init (8)..SH NOTESSince 0 is used as an error return this means that the first entry in theutmp file is not used..PP.B Ttyslot()is often found in a UNIX implementation,.B fttyslot()is Minix specific..SH AUTHORKees J. Bot (kjb@cs.vu.nl)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -