Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jan 31, 2015
  1. Replace PAGE_SIZE references.

Commits on Jan 30, 2015
  1. Fix socketcall on i386.

    Turns out I completely misunderstood the socketcall ABI and this never
Commits on Jan 18, 2015
Commits on Jan 4, 2015
  1. Fix errors with 'sudo reptyr -T'

    When we attach a process using `reptyr -T`, we create a tempdir and
    create a unix socket therein, which the target needs to be able to
    connect() to. If `reptyr -T` is run as root, the directory will only be
    available to root by default. chown the directory to the target, which
    should work for both common cases of attaching a target of the same uid,
    and root attaching a lesser uid's process.
Commits on Dec 1, 2014
  1. Open /dev/null as read-write.

    Slightly kinder to applications than expected to be able to write.
  2. Drop the signal(2) special case.

    For reasons I don't understand this is breaking in my 32-on-64 testing,
    and the sigaction path still works.
Commits on Nov 30, 2014
Commits on Nov 21, 2014
  1. Support multiple master fds in the terminal emulator.

    Notably, sshd does this, and we need to be sure to grab all of them.
Commits on Sep 2, 2014
  1. Implement support for personalities that use socketcall.

    Such as i386. closes #43.
Commits on Aug 21, 2014
Commits on Aug 12, 2014
  1. Merge branch 'steal-pty'

Commits on Aug 11, 2014
  1. use major(3)

Commits on Feb 3, 2014
  1. Suppress some false positives from the clang analyzer.

    We rely on the assumption that if a syscall returns an error, errno
    will be nonzero. See
Commits on Jan 10, 2014
Commits on Oct 5, 2013
Commits on Dec 15, 2012
Commits on Jul 21, 2012
  1. Don't error out if stderr is redirected.

    If a process is run as $cmd 2>/dev/null, we can still find a terminal on fd's 0
    and 1, so don't spuriously error out.
Commits on Apr 15, 2011
  1. Fix detection of controlling tty on ARM.

    dev_t is *not* necessarily the same as 'unsigned int', and pretending it is
    breaks on ARM.
Commits on Apr 11, 2011
Commits on Mar 2, 2011
  1. Merge branch 'attach-fds'

Commits on Feb 20, 2011
  1. Be smarter about choosing which fd's to attach.

    Instead of using readlink, stat() the child's file descriptors and
    compare the result to the device in /proc/$pid/stat and /dev/tty. This
    lets us properly attach a 'less' that is taking input from a pipe.
Commits on Feb 19, 2011
Commits on Feb 12, 2011
Commits on Jan 28, 2011
  1. Explicitly CONT the child on attach, and then STOP/CONT after attach.

    The explicit CONT on attach is needed in order for wait() to work on
    older kernels, and the STOP/CONT after attach is better at making bash
    notice the process is running again.
  2. Merge branch 'force-bg'

  3. Prefer mmap2() if present.

    i386 has an mmap(), but mmap2() is the one we want with the right
    calling convention.
Commits on Jan 27, 2011
Commits on Jan 25, 2011
  1. Send the child an explicit SIGCONT once we're done.

    This causes bash to notice that the process is backgrounded, which prevents it
    from sending a SIGTERM when the original shell exits.
Something went wrong with that request. Please try again.