posix_ctermid() - posix函数(可移植操作系统接口)
posix_ctermid()
(PHP 4, PHP 5, PHP 7)
Get path name of controlling terminal
说明
posix_ctermid(void): stringGenerates a string which is the pathname for the current controlling terminal for the process. On error this will set errno, which can be checked using posix_get_last_error()
返回值
Upon successful completion, returns string of the pathname to the current controlling terminal. Otherwise FALSE
is returned and errno is set, which can be checked with posix_get_last_error().
范例
posix_ctermid() example
This example will display the path to the current TTY.
参见
posix_ttyname()
Determine terminal device nameposix_get_last_error()
Retrieve the error number set by the last posix function that failed
You can write directly to the tty (screen) even when the shell has redirected output, with:
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!