We were talking about this yesterday. Reexec is the easiest option to implement but the trouble is that it only helps people who know they are upgrading. It doesn't help people who blithely run a system upgrade inside tmux and then have trouble when a protocol version bump stops them reattaching to it. People do do this, although hopefully not more than once :-).
So I would favour an approach where the new tmux server connects to the old one's socket and pulls across all the pty file descriptors. This is more complicated but means you can do it with only the new binary. And since we now ignore unknown message types we could do it without a protocol bump - it just wouldn't work with 1.9, rather than making the server die. However, I would resist the temptation to try to serialize everything - that way lies a maintenance nightmare. Instead I'd just have the new server create a new session called "imported" or something and put each pty in its own new window. The user can then use movep, swapp to put them wherever they want. Most will only want to keep a couple of long running processes anyway. We already have fd passing through imsg, so I don't think this would be too hard to implement, basically a new flag to the client (-U or something) tells it to force a new server and triggers a new MSG_IDENTIFY_* which makes the new server connect to the old and request it send over all it's ptys. It doesn't have to be too fancy, if it doesn't work people are no worse off than they are now. But someone has to write the code :-). On Wed, Feb 26, 2014 at 11:13:57PM -0500, Ben Boeckel wrote: > Hi, > > Would it be possible to have tmux support re-exec for the server? It'd > be nice to use the new server without tearing down all of my old shells > and sessions. It also causes problems if the new version is installed, > but I'm running an older server with a different protocol version. > > I guess tmux would need a way to serialize its internal state and pass > it off to the child, but I don't know how feasible this is. > > Thanks, > > --Ben > > ------------------------------------------------------------------------------ > Flow-based real-time traffic analytics software. Cisco certified tool. > Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer > Customize your own dashboards, set traffic alerts and generate reports. > Network behavioral analysis & security monitoring. All-in-one tool. > http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users