MacOS – tmux hangs when re-attaching session after logout

command linemacosmacportstmux

Since Yosemite, my tmux, which I installed via MacPorts, "hangs" when I re-attach it after my user has logged out and logged in again. I.e. it cannot start new processes, like a new command line. The logs in console do not show anything.

I do not even know how I start to figure out what's happening here.

Best Answer

I think the use of __DARWIN_VERS_1050 in the tmux Portfile may be causing this.

If you are able, try a clean compile from source (i.e. without that CPPFLAGS addition). Be sure to completely restart your tmux server using your fresh-built binary (the difference happens in the daemon(3) call made when the server first starts up—so using a “clean” binary to connect to a server started with the MacPorts-built binary would not help).


Tangentially, since you use tmux on OS X, you might also use my reattach-to-user-namespace wrapper program. It seems like the wrapper program may not actually be necessary on Yosemite for pasteboard access inside tmux. If you are using the wrapper (and you do not mind testing a bit), try removing it from your configuration on your Yosemite system. I would appreciate hearing whether things (continue) to work without use of the wrapper (or whether you still lose pasteboard access at some point).