Skip to content

Commit 1531b37

Browse files
v9vbruno-
authored andcommitted
Fix for multiple users on the same machine
The issue and fix are described in #16 . Without this change, tmux-continuum works only for one tmux server on the machine. In a multi-user environment (e.g. a shared server), when multiple users are running their own tmux servers, this means that tmux-continuum works only for one of the users. This change enables tmux-continuum for one tmux server per user instead of one tmux server per machine.
1 parent 7f99bee commit 1531b37

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### master
44
- bugfix: "auto restore" feature stopped working
55
- bugfix: prevent race condition when auto-saving with locks (@v9v)
6+
- Multiple users on a system can now each run continuum on their own.
67

78
### v3.1.0, 2015-03-14
89
- properly quote scripts

scripts/helpers.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ current_tmux_server_pid() {
2424

2525
all_tmux_processes() {
2626
# ignores `tmux source-file .tmux.conf` command used to reload tmux.conf
27-
ps -Ao "command pid" |
27+
local user_id=$(id -u)
28+
ps -u $user_id -o "command pid" |
2829
\grep "^tmux" |
2930
\grep -v "^tmux source"
3031
}

0 commit comments

Comments
 (0)