Archives
-
reptyr: Changing a process’s controlling terminal
reptyr (announced recently on this blog) takes a process that is currently running in one terminal, and transplants it to a new terminal. reptyr comes from a proud family of similar hacks, and works in the same basic way: We use ptrace(2) to attach to a target process and force it to execute code of [...]
Feb 8th, 2011 | Filed under linux -
reptyr: Attach a running process to a new terminal
Over the last week, I’ve written a nifty tool that I call reptyr. reptyr is a utility for taking an existing running program and attaching it to a new terminal. Started a long-running process over ssh, but have to leave and don’t want to interrupt it? Just start a screen, use reptyr to grab it, [...]
Jan 21st, 2011 | Filed under Low-level hacking -
A Brief Introduction to termios: Signaling and Job Control
(This is part three of a multi-part introduction to termios and terminal emulation on UNIX. Read part 1 or part 2 if you’re new here) For my final entry on termios, I will be looking at job control in the shell (i.e. backgrounding and foreground jobs) and the very closely related topic of signal generation [...]
Jan 11th, 2010 | Filed under linux, Uncategorized -
A Brief Introduction to termios: termios(3) and stty
(This is part two of a multi-part introduction to termios and terminal emulation on UNIX. Read part 1 if you’re new here) In this entry, we’ll look at the interfaces that are used to control the behavior of the “termios” box sitting between the master and slave pty. The behaviors I described last time are [...]
Dec 30th, 2009 | Filed under linux, Uncategorized -
A Brief Introduction to termios
If you’re a regular user of the terminal on a UNIX system, there are probably a large number of behaviors you take mostly for granted without really thinking about them. If you press ^C or ^Z it kills or stops the foreground program — unless it’s something like emacs or vim, in which case it [...]
Dec 22nd, 2009 | Filed under linux, Uncategorized