Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Apr 15, 2011

  1. Nelson Elhage

    Abstract out syscall numbers similarly to registers.

    authored April 15, 2011
  2. Nelson Elhage

    Fix detection of controlling tty on ARM.

    dev_t is *not* necessarily the same as 'unsigned int', and pretending it is
    breaks on ARM.
    authored April 15, 2011
  3. Nelson Elhage

    Tell GCC about the format specifiers in our debug functions.

    authored April 15, 2011

Apr 11, 2011

  1. Nelson Elhage

    Consistently use a space in 'if (...)' and 'while (...)'.

    authored April 10, 2011

Mar 02, 2011

  1. Nelson Elhage

    Merge branch 'attach-fds'

    authored March 01, 2011

Feb 23, 2011

  1. Guillaume Leconte

    fix: avoid memory leakage in case realloc() fails

    [nelhage@nelhage.com: Change error handling slightly]
    authored February 22, 2011 nelhage committed February 22, 2011

Feb 20, 2011

  1. Nelson Elhage

    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.
    authored February 20, 2011

Feb 19, 2011

  1. Nelson Elhage

    Add a -s option to force attaching stdio.

    authored February 19, 2011

Feb 12, 2011

  1. Nelson Elhage

    Add the license to all of the source files.

    authored February 12, 2011

Jan 28, 2011

  1. Nelson Elhage

    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.
    authored January 28, 2011
  2. Nelson Elhage

    Add an explicit check that the target is attached to a tty.

    authored January 27, 2011
  3. Nelson Elhage

    Merge branch 'force-bg'

    authored January 27, 2011
  4. Nelson Elhage

    Prefer mmap2() if present.

    i386 has an mmap(), but mmap2() is the one we want with the right
    calling convention.
    authored January 27, 2011

Jan 27, 2011

  1. Nelson Elhage

    Move detection of mmap_syscall into attach.c.

    authored January 26, 2011
  2. Nelson Elhage

    Detect PAGE_SIZE using syspathconf().

    authored January 26, 2011

Jan 25, 2011

  1. Nelson Elhage

    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.
    authored January 25, 2011
  2. Nelson Elhage

    Copy the termios settings before we background the target process.

    If the target /doesn't/ properly initialize the terminal after a
    SIGTSTP/continue (I'm looking at you, emacs), we need to be sure to grab the
    terminal state before we suspend it and the shell resets the terminal to cooked
    mode.
    authored January 25, 2011
  3. Nelson Elhage

    If we fail to attach to the target, SIGCONT it before exiting.

    authored January 25, 2011
  4. Nelson Elhage

    Use wait4 instead of waitid().

    waitid() seems to return EINVAL sometimes, for reasons I don't understand.
    authored January 25, 2011
  5. Nelson Elhage

    wait_for_stop: Don't leak an fd, and add comments.

    authored January 25, 2011
  6. Nelson Elhage

    Try to stop the target with SIGTSTP before attaching.

    This should both cause the target process to redraw / reinitialize the
    terminal (since it thinks it's been backgrounded and restarted), and should give
    you back the old terminal, since it sees the process now running in the
    "background".
    authored January 25, 2011

Jan 22, 2011

  1. Nelson Elhage

    Add some more error diagnostics.

    authored January 22, 2011
  2. Nelson Elhage

    Fix compilation on amd64.

    authored January 22, 2011
  3. Nelson Elhage

    Handle attaching to processes that are already session leaders.

    These are actually easier -- we just need to TIOCNOTTY, instead of
    playing games with a dummy child and setsid.
    authored January 22, 2011
  4. Nelson Elhage

    Better error handling if setsid() fails.

    authored January 21, 2011
  5. Nelson Elhage

    Better status reporting during attach.

    authored January 21, 2011
  6. Nelson Elhage

    Break out prototypes into a header file.

    authored January 21, 2011
  7. Nelson Elhage

    Better error reporting if attaching to a child fails.

    authored January 21, 2011

Jan 18, 2011

  1. Nelson Elhage

    Fix the rt_sigaction call.

    sizeof(sigset_t) is something ludicrous like 0x80 in userspace. Just hard-code
    it at 8, since all the userspace definitions seem to be lies.
    authored January 18, 2011
  2. Nelson Elhage

    Use syscalls that are available on amd64.

    authored January 17, 2011
  3. Nelson Elhage

    Don't allow the child to run unchecked between two syscalls.

    We were letting the child return from fork() and run to the next
    syscall. This happened to work on my system with 'less', but
    segfaulted on mutt. Instead, we need to reset the child to before the
    syscall point, so that none of its code is ever run.
    authored January 17, 2011
  4. Nelson Elhage

    Checkpoint working version.

    authored January 17, 2011
  5. Nelson Elhage

    Checkpoint overwriting child fd's.

    authored January 17, 2011
  6. Nelson Elhage

    Checkpoint attach work-in-progress.

    authored January 17, 2011
Something went wrong with that request. Please try again.