Skip to content

Conversation

@jamesb
Copy link

@jamesb jamesb commented Sep 6, 2017

In a configuration where multiple users can host wemux, suppose user foo starts a wemux session and then ends the tmux session without using wemux stop (say, by closing all tmux windows). In this scenario, the wemux socket will be left as something like...
srw-rw-rw- 1 foo foo 0 Sep 6 10:55 wemux-wemux=
... and another user, baz, won't be able to successfully run wemux start because the server isn't running and foo owns the socket. If baz has sudo access, baz can sudo chown baz /tmp/wemux/wemux and then remove it.

The wemux script currently responds to both wemux stop and wemux kill by calling the stop_server function. In this PR, we differentiate wemux kill by attempting to forcibly change the ownership of the socket (using sudo, as above) before calling stop_server. This is convenient in a multi-tenant compute instance and should help ease some frustration when colleagues forget to cleanly stop the wemux session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant