Skip to content
Commits on Jul 22, 2012
  1. wrapper: 10.8 "Mountain Lion" support

    committed
    There has been some promising feedback regarding Mountain Lion.
    
        f4a2901#all_commit_comments
    
    Update the wrapper code to not issue a warning about an "unsupported
    new OS" when run on Mountain Lion.
    
    There may be further changes once Apple publishes the 10.8 launchd
    sources (e.g. if the signature of the relevant function is changed
    as it was between 10.5 and 10.6).
Commits on Aug 19, 2011
  1. wrapper: 10.7 "Lion" support

    committed
    Several users have reported "no problems" using the wrapper with
    Lion (although all using iTerm or iTerm2).
    
        51bbc9f#all_commit_comments
        #3
    
    Update the wrapper code to not issue a warning about an "unsupported
    new OS" when run on Lion.
    
    The signature of _vprocmgr_move_subset_to_user matches the one from
    10.6 (see libvproc.c or vproc_priv.h in the launchd source code).
    
        http://www.opensource.apple.com/release/mac-os-x-107/
  2. wrapper: clarify use of 'os' variable

    committed
    The 'os' variable switches midway from representing the converted
    Mac OS X major release number to representing the "reattach
    variation" that we will are about to use. The former is (more or
    less) a number, but the latter is really more of an enum.
Commits on Jul 22, 2011
  1. Revert "wrapper: provisional 10.7 "Lion" support"

    committed
    A user has reported kernel panics (!) with possible associations
    with tmux and the wrapper.
    
        https://sourceforge.net/mailarchive/message.php?msg_id=27834727
    
    Go back to warning on 10.7 until I hear some better-sounding reports
    (or get some first-hand experience with Lion)..
    
    This reverts commit 8c5ea5f.
Commits on Jul 21, 2011
  1. wrapper: provisional 10.7 "Lion" support

    committed
    Update the wrapper code to not issue a warning about an "unsupported
    new OS" when run on Lion.
    
    This change is provisional because I have not tested it on a 10.7
    machine. The evidence seems to indicate that the "10.6 method" will
    also work on 10.7.
    
    Specifically, The signature of _vprocmgr_move_subset_to_user matches
    the one from 10.6 (see libvproc.c or vproc_priv.h in the launchd
    source code).
    
        http://www.opensource.apple.com/release/mac-os-x-107/
    
    Wikipedia's Darwin article says 10.7 is Darwin 11.0.0, so I assume
    that is what uname reports for ustname.release.
    
        http://en.wikipedia.org/wiki/Darwin_(operating_system)
Commits on Jun 26, 2011
  1. README.md: protect emphasis before right single quote

    committed
    redcarpet in rdiscount mode (RedcarpetCompat) renders
    
        *foo*’s
    
    literally instead of providing emphasis.
    
    If I write the right single quote as an entity:
    
        *foo*&#rsquo;s
    
    then rdiscount, redcarpet and RedcarpetCompat all render the
    emphasis.
    
    This problem did show up in GitHub’s rendering of README.md.
    
    Thanks to Trevor for pointing out redcarpet and RedcarpetCompat:
    
        #2 (comment)
  2. README.md: escape "bare" underscores

    committed
    Even though some Markdown interpreters do not give special meaning
    to these particular underscores (because they were inside
    asterisks?), they should be escaped so that some other Markdown
    interpreter (e.g. redcarpet in its "native" mode) will not interpret
    them as emphasis/strong delimiters.
    
    Tested with rdiscount, redcarpet and RedcarpetCompat.
    
    This problem did NOT show up when GitHub renders README.md (they use
    RedCarpetCompat?), but it is probably good to fix it anyway since it
    does confuse the default redcarpet.
  3. Merge branch 'tw/develop'

    committed
    My comments on Trevor's changes:
    
      Makefile: remove ppc from default arches
    
        This also makes sense since PPC binaries seems unlikely to be
        supported in the next release of Mac OS X (10.7 Lion, due next
        month).
    
      README.md: indentation fixes
    
        These are correct.
    
        My local rdiscount-based rendering did not require the extra
        spaces to achieve the desired output, but GitHub was rendering
        them differently. These changes make GitHub's output match my
        local output (at least for the modified section).
    
      README.md: add `tmux kill-server`
    
        Good idea. However, given the context ("restart your server"),
        I think we should explicitly warn about its effects. I appended
        a commit.
  4. README.md: be explicit about kill-server

    committed
    I would not want someone to think that `tmux kill-server` could be
    used to simply "Restart [their] *tmux* server" (i.e. the topic of
    the list item) without losing all of their existing sessions,
    windows, panes, processes, etc.
    
    Also, kill trailing whitespace introduced in the commit that
    introduced `kill-server`.
Commits on Jun 25, 2011
  1. @trevor

    minor doc styling

    trevor committed
  2. @trevor

    minor doc styling

    trevor committed
  3. @trevor

    resolve make error when llvm doesn't have powerpc

    trevor committed
    % make
    cc -Wall -Wextra -ansi -pendantic -arch i386 -arch ppc -arch x86_64 -mmacosx-version-min=10.5   -c -o test.o test.c
    llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2': execvp: No such file or directory
    lipo: can't figure out the architecture type of: /var/folders/MT/MTdESo89GBCaGM7Hevp5+E+++TI/-Tmp-//ccG0JJrt.out
    make: *** [test.o] Error 255
Commits on Apr 1, 2011
Commits on Mar 30, 2011
  1. standardize static strings

    committed
    Since I never change the characters or reassign the pointers, they
    might as well all be static, const char arrays.
Commits on Mar 29, 2011
  1. test: const-ize (struct cmd).func

    committed
    cmd_func is also redefined as the function type itself instead of
    a pointer to a function; we can now use it to declare the functions.
  2. test: clean up struct cmd strings

    committed
    There is no good reason to have the strings be arrays. The compiler
    would probably warn if the strings got too big, but it might not
    warn if there the only thing that would fit was the trailing '\0'.
    
        char foo[8] = "abcdefgh";  /* might not be '\0' terminated */
  3. test: delete junk typedef

    committed
  4. test: internal functions should be static

    committed
    Nothing else uses the object file, but we might as well make our
    "private" functions static.
  5. wrapper: proper free if exec and die fail

    committed
    This is unlikely, but we might as well fix it so that we are not
    freeing things we did not allocate.
    
    A development version of 1d62824 (wrapper: learn the "-l" option,
    2011-03-18) worked something like this, but it was lost to reworking
    before the final commit.
    
    valgrind will point out of the problem if we arrange for die_errno
    to not actually exit.
  6. Crank up and fix warnings

    committed
  7. NOTES: clean ups; summary

    committed
    Found this in a stash; it was supposed to be part of
    351e829 (README.md, 2011-03-26).
Commits on Mar 27, 2011
  1. msg.h: license

    committed
    Oops.
Commits on Mar 26, 2011
  1. LICENSE: Simplified BSD

    committed
  2. README.md

    committed
  3. add usage/help

    committed
  4. Makefile: universal compilation

    committed
    Set the minimum Mac OS X version to 10.5.
    
    It is possible to compile these programs on Mac OS X 10.4, however
    none of the useful private API functions are available there.
Commits on Mar 25, 2011
  1. msg: make format arg last named argument

    committed
    A call like the following will look a bit strange to readers
    expecting a printf-like sequence:
    
        vmsg("pre%fix", "the %s string", "suf%fix", "format");
    
    It may be easier to understand if the prefix and the suffix come
    first:
    
        vmsg("pre%fix", "suf%fix", "the %s string", "format");
    
    Done that way, readers might be able to visually "skip over" the
    first two paramters and read the rest as a printf-like sequence
    (format string, then values).
  2. msg: %-double prefix

    committed
    All the existing callers use literal strings without any percent
    characters, but we should protect against future callers including
    a percent in the prefix string, too.
  3. msg: make vmsg and vfmsg declarations match implementation

    committed
    The 'suf' parameter was a late addition to the msg implementation.
    I forgot to add it to the declarations in the header file.
    
    Include msg.h in msg.c so the compiler will flag any future
    mismatches.
Commits on Mar 24, 2011
  1. test: runtime configurable actions

    committed
    Now we can test various combinations and orders of likely functions by changing the command-line parameters.
    
    Summary of following examples:
    
      To retain access to the per-user bootstrap namespace (tested by
      accessing the pasteboard with the pbpaste command), we always need
      to make a private API:
    
        Use the system daemon(3) and _vprocmgr_move_subset_to_user
    
          The system daemon(3) forces the forked process into the "root
          bootstrap namespace" where it can not access the per-user
          pasteboard service. We need to reattach to it to get access to
          the pasteboard.
    
        Use our own daemon() and _vprocmgr_detach_from_console
    
          Our own daemon() can prevent us from leaving the per-user
          bootstrap namespace, but we need to "detach" (move into the
          Background "bootstrap session") to make sure we retain access
          to the per-user bootstrap namespace after our initial session
          starter has exited (e.g. logging out of the GUI session, or
          logging out of an SSH session -- a non-"detached" process
          started as a child of either one will lose access to the
          per-user bootstrap namespace).
    
    Examples:
    
      pbpaste after system daemon(3)
      (i.e. minimal reproduction of stock tmux problem)
    
        ./test daemon=sys system=pbpaste
    
      Failure: pbpaste returns 1 -- it failed to access the pasteboard
    
      Reattaching to the per-user bootstrap namespace:
    
        ./test daemon=sys move-to-user=10.6 system=pbpaste
    
      Success: pbpaste returns 0, we see the pasteboard contents
    
      Using our own daemon():
    
        ./test daemon=ours system=pbpaste
    
      Success: pbpaste returns 0, we see the pasteboard contents.
    
      Using our own daemon() in an SSH connection that sticks around
      for a short while (long enough for pbpaste to run):
    
        cp /dev/null /tmp/f &&
        ssh localhost `pwd`/test \
          daemon=ours
          system=pbpaste 2\> /tmp/f \; sleep 1 &&
        { cat /tmp/f; tail -f /tmp/f; }
    
      Success: pbpaste returns 0, we see the pasteboard contents.
    
      Using our own daemon() in an SSH connection that exits before
      we run pbpaste:
    
        cp /dev/null /tmp/f &&
        ssh localhost `pwd`/test \
          daemon=ours \
          msg=sleeping... sleep=1 msg='done\ sleeping' \
          system=pbpaste 2\> /tmp/f &&
        { cat /tmp/f; tail -f /tmp/f; }
    
      Failure: pbpaste returns 1; When the SSH connection dies its
               children lose access to the per-user bootstrap namespace
               required to use the pasteboard.
    
      Using our own daemon() then "detaching from the console" in an SSH
      connection that exits before we run pbpaste:
    
      (Apple patched the "detach from console" into screen for Mac OS X v10.6;
       screen does not use daemon(), but using our own daemon that does
       not pull us into the root bootstrap namespace is, for our
       purposes, nearly equivalent to not using the system version.)
    
        cp /dev/null /tmp/f &&
        ssh localhost `pwd`/test \
          daemon=ours \
          detach \
          msg=sleeping... sleep=1 msg='done\ sleeping' \
          system=pbpaste 2\> /tmp/f &&
        { cat /tmp/f; tail -f /tmp/f; }
    
      Success: pbpaste return 0, we see the pasteboard contents.
    
      Using the system daemon(3), then reattaching to the per-user
      bootstrap namespace:
    
        cp /dev/null /tmp/f &&
        ssh localhost `pwd`/test \
          daemon=sys \
          move-to-user=10.6 \
          msg=sleeping... sleep=1 msg='done\ sleeping' \
          system=pbpaste 2\> /tmp/f &&
        { cat /tmp/f; tail -f /tmp/f; }
    
      Success: pbpaste return 0, we see the pasteboard contents.
  2. wrapper: extract die, etc. into msg.c

    committed
    These functions will be reused shortly in the test program.
    
    Replace the hacky die_errno macro with a proper function.
Commits on Mar 21, 2011
  1. TODO: -detach +runtimeconf

    committed
    _vprocmgr_detach_from_console does not do the same kind of work as
    _vprocmgr_move_subset_to_user.
    
    From what I can tell, it only prevents its caller (and its future(?)
    children) from losing access to the per-user bootstrap namespace
    when the process that started their (bootstrap-(?), certainly not
    Unix-) session exits.
    
    It will not do anything useful if used with the system daemon(3),
    because that daemon() will not only "detach from the console", but
    goes even further by moving to the root bootstrap namespace (which
    prevents access to the per-user bootstrap namespace). It only seems
    useful in places where the system daemon(3) is not used (screen(1)
    seems to do without daemon(3), which is why it is useful there).
    
    It works if you use it with your own custom daemon() that does not
    forcibly move the resulting process to the root bootstrap namespace,
    but it will not reattach a process to the per-user bootstrap
    namespace.
    
    So, if we use the system daemon(3) we need to reattach to the
    per-user bootstrap namespace with code similar to the 10.5 screen
    patch (_vprocmgr_move_subset_to_user). If we use a custom daemon(),
    then we use code similar to the 10.6 screen patch
    (_vprocmgr_detach_from_console).
    
    Ultimately, we need a private call if we want to ensure access to
    the pasteboard after the session-starter has exited.
    
    ----
    
    Start plans for revamping 'test', so that we can customize what it
    does at runtime (to try out different variations and orders of
    calling the various functions without editing and recompiling).
Something went wrong with that request. Please try again.