TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The TTY Demystified

157 点作者 natex超过 12 年前

10 条评论

noirman超过 12 年前
Previously on Hacker News: <a href="http://news.ycombinator.com/item?id=4062981" rel="nofollow">http://news.ycombinator.com/item?id=4062981</a>
pooriaazimi超过 12 年前
Very informative article.<p>What I <i>love</i> is how they come up with different names for different signals that kill/suspend processes:<p>`SIGHUP`, `SIGINT`, `SIGQUIT`, `SIGABRT`, `SIGKILL`, `SIGTERM` and `SIGSTOP`!<p>7 different combinations of SIG and a verb that means "terminate/kill/stop/close/quit/suspend", and it's not <i>that</i> confusing (once you get your head around it). Must have been quite a challenge!
评论 #4546629 未加载
评论 #4546145 未加载
zx2c4超过 12 年前
The article makes an interesting point<p>"There's an important difference here: Writing to a TTY which is stopped due to flow control, or due to lack of kernel buffer space, will block your process, whereas writing to a TTY from a background job will cause a SIGTTOU to suspend the entire process group. I don't know why the designers of UNIX had to go all the way to invent SIGTTOU and SIGTTIN instead of relying on blocking I/O, but my best guess is that the TTY driver, being in charge of job control, was designed to monitor and manipulate whole jobs; never the individual processes within them."<p>Can anyone provide any more insight about this?
ChuckMcM超过 12 年前
This is a great article, at some point it will be a story like how the rail spacing in England is a function of the ruts created by the Roman chariots (unclear if that is actually the case (see snopes etc)), Having written tty driver code for FiNE (Fine-is-not-EMACS) there was a lot stuff related to just how fast the terminal on the other end of the serial channel could do stuff. (we had tunables for insert line, scroll etc).
评论 #4544794 未加载
Zenst超过 12 年前
Nice read, the part at the end "Finally, stty sane will restore your TTY device configuration to something reasonable" Realy should be what you learn from your fist instance of using a terminal (to many bad memorys of yesteryear systems over RS232 and uucp and modems, stop me now).<p>But everybody learns what they need to learn, even if it is setting the backspace/del keys to something visualy complient.<p>Knowing a tty and VT commands you can do some realy simple clever stuff, like find certain people logged in and there tty and cat append information to there screens and if they have terminals with extra sub lines you can sends a string that will memorise the screen cursor position, reposition cursor to the lower lines and display your text and then restore the cursor position. A very easy and simple way to instantly alert logged on users in certain groups. Can do all that in shell script easily. So knowing how things work and there capabilities and even there history and background so you understand why they are the way they are and from that appreciete there limitations. Then you can start doing some realy fun things. Again, nice read as verifys what you know and will fill in some worthy blanks.
评论 #4545247 未加载
stox超过 12 年前
The concept of a teletype predated ASCII by decades. I would not use this article for any historical references.
cientifico超过 12 年前
How many times this article appear at the hacker new front page?
评论 #4545111 未加载
cm3超过 12 年前
This shows why Plan 9 as part of the plan to fix inconsistencies and problems in UNIX wrote a terminal which doesn't even support escape sequences for coloring. I'm not a Plan 9 expert but it's actually for the better. Try launching some program like the sudoku game or acme from 9term inside Plan 9 compared to doing the same in plan9port's 9term or a plain xterm. On Plan 9 your 9term will become the program you launch.
评论 #4546262 未加载
joedoe55555超过 12 年前
Ok, so how do I build a teletype that I can connect via USB to my Mac? (And will vi work? :D)
评论 #4545167 未加载
评论 #4545190 未加载
sharkweek超过 12 年前
Fascinating read -- when I was a bit... less mature, I used to use this service for many a prank call, which at one point apparently accounted for 85-90% of the calls according to some operators: <a href="http://en.wikipedia.org/wiki/Telecommunications_relay_service#Fraudulent_uses_in_the_United_States" rel="nofollow">http://en.wikipedia.org/wiki/Telecommunications_relay_servic...</a>
评论 #4545718 未加载
评论 #4545683 未加载