Merge lp:~james-s-spencer/byobu/fix-statusd-launch into lp:byobu

Proposed by James Spencer on 2011-07-27
Status: Rejected
Rejected by: Dustin Kirkland  on 2011-07-29
Proposed branch: lp:~james-s-spencer/byobu/fix-statusd-launch
Merge into: lp:byobu
Diff against target: 26 lines (+3/-2)
2 files modified
usr/bin/byobu-statusd (+3/-0)
usr/share/byobu/profiles/common (+0/-2)
To merge this branch: bzr merge lp:~james-s-spencer/byobu/fix-statusd-launch
Reviewer Review Type Date Requested Status
Dustin Kirkland  2011-07-27 Pending
Review via email: mp+69486@code.launchpad.net

Description of the change

byobu-statusd was being started (and not killed) every time I ran a new byobu instance. Fix this.

To post a comment you must log in.
Dustin Kirkland  (kirkland) wrote :

Thanks for the branch. I've reverted the byobu-statusd changes altogether now.

Unmerged revisions

1546. By James Spencer <jspencer@pauling> on 2011-07-27

Ensure only one instance of byobu-statusd is running.

The exec killall command in the common profile didn't work on my systems (Arch
Linux and Ubuntu 10.04). The error message indicated that this might be
because a screen window hadn't been initialised by the time the exec command was run.

A different approach to this problem is to have byobu-statusd exit immediately if
an instance of byobu-statusd is already running.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'usr/bin/byobu-statusd'
2--- usr/bin/byobu-statusd 2011-07-24 19:20:24 +0000
3+++ usr/bin/byobu-statusd 2011-07-27 15:41:43 +0000
4@@ -22,6 +22,9 @@
5 [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
6 . "${BYOBU_PREFIX}/lib/${PKG}/.common"
7
8+# Exit if byobu-statusd is already running. Only need one instance!
9+ps -C byobu-statusd u | grep $USER | grep -v $$ && exit 0
10+
11 # Clean and create cache directories
12 rm -rf "$BYOBU_RUN_DIR/status" "$BYOBU_RUN_DIR/.last"
13 mkdir -p "$BYOBU_RUN_DIR/status" "$BYOBU_RUN_DIR/.last"
14
15=== modified file 'usr/share/byobu/profiles/common'
16--- usr/share/byobu/profiles/common 2011-07-19 23:03:45 +0000
17+++ usr/share/byobu/profiles/common 2011-07-27 15:41:43 +0000
18@@ -28,8 +28,6 @@
19 defutf8 on
20 deflogin on
21
22-# We don't need/want more than one byobu-statusd running per user
23-exec killall -u $USER byobu-statusd
24 backtick 10 9999999 9999999 byobu-janitor
25 backtick 11 9999999 9999999 printf "\005-1="
26 backtick 12 9999999 9999999 byobu-status color

Subscribers

People subscribed via source and target branches