Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
base: fbb3f1e408ed
Choose a base ref
...
head repository: rubinius/rubinius
compare: 0e2ace24f2f9
Choose a head ref
  • 4 commits
  • 12 files changed
  • 1 contributor

Commits on May 7, 2015

  1. Copy the full SHA
    5576d2c View commit details
    Browse the repository at this point in the history
  2. Reworked Console connection mechanism.

    One major problem with the previous mechanism was that there's no way
    for a process to clean up from a SIGKILL, so there's no way to not litter
    some directory with the console files that the process would pre-emptively
    create.
    
    The new process timeline looks like this:
    
    1. When a Rubinius process starts, it opens (creating if necessary, and
    truncating) the system.console.path file. It watches that file for
    modifications. If the process is killed, that file will persist, but there
    is only one such file for N many processes. Opening the file advertises that
    the process is available for Console connections. The file descriptor has
    the close-on-exec flag set.
    
    2. When a change is detected on the system.console.path file, the process
    stats two files named ${system.console.path}-$pid-{request, response}. If
    these files exist and are regular files, a connection is initiated.
    
    3. Threads are created for the request, response, and worker functions.
    While the connection is maintained by the client, new connection attempts
    are ignored.
    
    4. When the connection is terminated by the client, a new connection may
    be initiated as described in 2.
    
    When the process with a connected client forks, the child process closes
    the Console request and response files.
    
    When a process without a connected client forks, the listener is recreated
    in the child.
    brixen committed May 7, 2015
    Copy the full SHA
    4d299a3 View commit details
    Browse the repository at this point in the history
  3. Fill in standard IO file descriptors on startup.

    If the process that exec's us had closed file descriptors 0, 1, or 2, we re-open
    them to tmp files so the descriptors are allocated.
    brixen committed May 7, 2015
    Copy the full SHA
    874d5be View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    0e2ace2 View commit details
    Browse the repository at this point in the history