Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 16:25 < vokoda> which program sends information like terminal size over an openssh connecton?
- 16:25 < exarkun> vokoda: which program?
- 16:26 < glyph> exarkun: I think he means, is it bash's job, or sshd's job, or the kernel's job
- 16:26 < glyph> exarkun: and I'm slightly curious too
- 16:26 < foom> the kernel sends a SIGWINCH to ssh
- 16:26 < SpComb> perhaps ssh has a tty?
- 16:26 < vokoda> glyph: yes, that's what I meant
- 16:26 < foom> ssh sends it over the ssh connection to the sshd
- 16:26 < foom> the sshd configures the tty on the remote end, and that results in a SIGWINCH going to the remote bash
- 16:27 < glyph> foom: really, it's the kernel? It's not like xterm?
- 16:28 < exarkun> when you resize the xterm, it configures the tty
- 16:28 < exarkun> that results in the local SIGWINCH
- 16:28 < foom> xterm sets the tty's rows/cols.
- 16:28 < exarkun> from the kernel
- 16:28 < foom> the kernel sends SIGWINCH when that happens.
- 16:29 < glyph> what's the API for xterm's side of things? some ioctls?
- 16:29 < exarkun> ioctl TIOCGWINSZ
- 16:29 < glyph> heh
- 16:29 < glyph> in 20 minutes I maybe even would have thought to look at that
- 16:30 < exarkun> actually that's for getting the size, sorry
- 16:30 < glyph> Does the kernel actually have an idea of what characters are on the screen of a given PTY?
- 16:30 < exarkun> I meant TIOCSWINSZ obviously.
- 16:30 < glyph> exarkun: obviously, it was implied.
- 16:30 < foom> nope
- 16:30 < foom> it sends them across and forgets
- 16:30 < glyph> foom: OK, I thought not.
- 16:30 < glyph> I just didn't realize that it actually remembered the height and width.
- 16:30 < foom> stty -a
- 16:30 < glyph> Although my brief encounter with TIOCGWINSZ should have taught me that.
- 16:30 < foom> it remembers all sorts of crap
- 16:30 < exarkun> staaaaate
- 16:31 < vokoda> thanks foom, interesting
- 16:31 * glyph blinks
- 16:31 < glyph> foom: thanks
- 16:31 < foom> It's rather astounding how much kernel crap is involved with displaying a bash in an xterm window.
- 16:31 < glyph> foom: Less kernel crap than displaying cmd.com in a ... window, if you can call it that
- 16:31 < exarkun> video memory region
- 16:32 < glyph> (sorry I know it's actually cmd.exe it's just _sooooo_ busted)
- 16:32 < glyph> exarkun: I think in win7 it might actually be a window instead of a pointer to some kernel memory
- 16:33 < foom> yes, windows is even awesomer. What with the ANSI terminal emulation also being in the kernel and all.
- 16:34 < glyph> yeah, windows hella knows what characters are in your terminal
- 16:34 < glyph> and I think in your scrollback buffer, even
- 16:35 < exarkun> because they're not really in your terminal
- 16:35 < exarkun> they're in cmd.exe and you just get to look at them sometimes
- 16:36 < foom> Are they really in cmd.exe? Somehow it can also output to a pipe.
- 16:37 < foom> Does libc loads up ansi.sys into the cmd.exe's process space if it's outputting to a terminal?
- 16:37 < exarkun> I guess I probably don't know how it really works anymore
- 16:37 < exarkun> but I think as soon as pipes are involved, everything changes
- 16:38 < exarkun> that is, you have to ask for stdio in a program
- 16:38 < glyph> no, you need command.com to use ansi.sys
- 16:38 < glyph> cmd.exe does colors some other way
- 16:38 < exarkun> and when you do that, all the rules change
- <zykes-> how is PB differencing from say AMP ?
- <exarkun> In a lot of ways [17:34]
- <zykes-> mains are ?
- <glyph> AMP is simpler to implement, easier to implement cross-language data
- structures, possibly more secure (although that is a complicated
- conversation), probably simpler to optimize [17:35]
- <glyph> PB is easier to implement complex state-sharing protocols with, easier
- to address individual objects with in a large object graph
- [17:36]
- <zykes-> guess i'll keep with AMP then :)
- <glyph> I generally tend to recommend AMP [17:37]
- <exarkun> I don't know if there's any reason for new development to use PB.
- <zykes-> why not exarkun ? :p
- <exarkun> AMP does enough, and simpler is always better. [17:38]
- <zykes-> can i use amp with ssl ? [17:39]
- <exarkun> yes
- <zykes-> kk
Add Comment
Please, Sign In to add comment