Unexpectedly useful Unix utility [entries|reading|network|archive]
simont

[ userinfo | dreamwidth userinfo ]
[ archive | journal archive ]

Wed 2008-05-21 12:02
Unexpectedly useful Unix utility
LinkReply
[personal profile] fanfWed 2008-05-21 13:34
I have a similar program called pty. I wrote it to work around a bug in xterm, which thinks it knows the best way to initialize a pty, but is wrong, and has many options for tweaking its pty handling, which are also wrong. In order to work out WTF it was doing, I even re-wrote unifdef so I could see what code xterm ran on FreeBSD - this was not immediately obvious because xterm's pty handling code has about the highest ifdef density I've seen.

It turns out that the easiest way to discourage xterm from screwing up the pty settings is to ensure it has a /dev/tty whose settings it can copy. Unfortunately X sessions usually don't have a /dev/tty. So I wrote my pty program so I could run it in my .xsession script as a wrapper around fvwm, so that my window manager and all the programs it spawns (especially xterm) have a /dev/tty to use as a template when creating ptys.
Link Reply to this | Thread
[personal profile] simontWed 2008-05-21 13:45
I have a similar program called pty.

IWJ and I have just found out between us that so did DJB in the early 1990s...
Link Reply to this | Parent
navigation
[ go | Previous Entry | Next Entry ]
[ add | to Memories ]