33f3f40866
Even though POSIX allows us to return simply /dev/tty as a pathname identifying the controlling terminal of the running process, it is nicer if this function were actually useful, by returning the actual pathname of the controlling terminal. Implement ctermid() by using the kern.devname sysctl to resolve the actual name of /dev/tty. Don't use devname(3), since it may return bogus strings like #C:0x123. |
||
---|---|---|
.. | ||
amd64 | ||
arm | ||
compat-43 | ||
db | ||
gdtoa | ||
gen | ||
gmon | ||
i386 | ||
ia64 | ||
iconv | ||
include | ||
inet | ||
isc | ||
locale | ||
mips | ||
nameser | ||
net | ||
nls | ||
posix1e | ||
powerpc | ||
powerpc64 | ||
quad | ||
regex | ||
resolv | ||
rpc | ||
softfloat | ||
sparc64 | ||
stdio | ||
stdlib | ||
stdtime | ||
string | ||
sys | ||
uuid | ||
xdr | ||
yp | ||
Makefile | ||
Versions.def |