Byobu + tmux + OSX + specific circumstances = zombie tmux clients
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
byobu |
Incomplete
|
Medium
|
Dustin Kirkland |
Bug Description
Short version: On OSX, if you use "byobu-launch" (including via "byobu-enable") and then close the console window without detaching, that window's client sticks around after the window itself is closed. This limits the maximum size of the tmux viewport to whatever size that window was when it was closed.
Longer version:
This is a bug that happens when Byobu is started in a certain way and then the console window containing it is closed without first detaching. The bug happens specifically when "byobu-launcher" is run without "exec" in a script that is sourced from the command line. The bug does not happen if the script contains "exec byobu-launcher", or if the script is executed instead of sourced, or if "byobu-launcher" is run directly from the command line. A simple way to meet the above conditions is by sourcing the following 2-line script:
#!/bin/sh
byobu-launcher
So, to reproduce this first make sure there is no existing byobu-instance, then source that script in a small console window, and then close that window without detaching the client. Then, open a new window and attach to the byobu tmux session again. Try to resize the session to a larger size, and observe that it will never exceed the size of the previous window that was closed. Run "tmux list-clients" and observe that there are two clients listed: the current one, and the zombie one from the closed window.
I also have access to an Ubuntu machine, which I will test this on shortly.
The following patch "fixes" the problem by changing the "byobu-launch" script to do "exec byobu-launcher", which prevents it from triggering the bug. Obviously this also breaks the functionality of the commented-out code.