* usr/bin/byobu-select-session: LP: #911500

- detect and avoid some circular byobu-inside-byobu infinite loops
This commit is contained in:
Dustin Kirkland 2012-01-28 12:59:55 -06:00
commit f13586dc51
2 changed files with 8 additions and 0 deletions

2
debian/changelog vendored
View file

@ -25,6 +25,8 @@ byobu (5.6) unreleased; urgency=low
* usr/bin/byobu, usr/bin/byobu-janitor, usr/lib/byobu/disk_io,
usr/lib/byobu/include/constants:
- use BYOBU_READLINK instead of READLINK
* usr/bin/byobu-select-session: LP: #911500
- detect and avoid some circular byobu-inside-byobu infinite loops
[ Ryan Thompson ]
* usr/bin/byobu-select-session: LP: #919391

View file

@ -117,6 +117,12 @@ if len(sessions) > 1:
elif len(sessions) == 1:
# Auto-select the only session
choice = 1
if BYOBU_BACKEND == "tmux" and os.getenv("TMUX"):
sys.stderr.write("ERROR: Sessions should be nested with care. Unset $TMUX to force.\n")
sys.exit(1)
elif BYOBU_BACKEND == "screen" and re.match("screen", os.getenv("TERM")):
sys.stderr.write("ERROR: Sessions should be nested with care. Remove 'screen' from $TERM to force.\n")
sys.exit(1)
if choice:
if sessions[choice-1] == "NEW":