Please sign in to comment.
wrapper: make errors fall through to exec()
Above the declaration of _vprocmgr_move_subset_to_user() in 10.8's launchd-442.21/liblaunch/vproc_priv.h there is a comment that reads: > One day, we'll be able to get rid of this... This caused me to consider the situation where the function is no longer available (whether or not some other workaround is required to (e.g.) gain access to the pasteboard). The original behavior of this wrapper program is to immediately abort on all errors. This is acceptable behavior for programs that are used interactively where the user can decide what to do next (e.g. try again without the wrapper). However, this wrapper is not typically used interactively, but more "automatically" (e.g. via default-command in tmux; as I described in the README). The abort-on-error behavior is much less acceptable in this situation (it would appear that tmux was unable to create (default) sessions, windows, or panes). For "automatic" uses, it would be much nicer to always attempt to run the specified program (after printing an appropriate message that describes the reason we failed to reattach to the user bootstrap namespace). Therefore, adjust the error handling so that we always fall through to the code that does the exec() (while still issuing informative messages).
- Loading branch information...
Showing with 35 additions and 12 deletions.