2017-04-28 19:22:01 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# when we kill a session, processes running in it should be killed
|
|
|
|
|
|
|
|
PATH=/bin:/usr/bin
|
|
|
|
TERM=screen
|
|
|
|
|
|
|
|
[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
|
|
|
|
TMUX="$TEST_TMUX -Ltest"
|
|
|
|
$TMUX kill-server 2>/dev/null
|
2022-07-06 08:54:53 +00:00
|
|
|
sleep 1
|
2017-04-28 19:22:01 +00:00
|
|
|
|
2019-04-02 08:48:26 +00:00
|
|
|
$TMUX -f/dev/null new -d 'sleep 1000' || exit 1
|
2017-04-28 19:22:01 +00:00
|
|
|
P=$($TMUX display -pt0:0.0 '#{pane_pid}')
|
2019-04-02 08:48:26 +00:00
|
|
|
$TMUX -f/dev/null new -d || exit 1
|
2017-04-28 19:22:01 +00:00
|
|
|
sleep 1
|
|
|
|
$TMUX kill-session -t0:
|
2022-07-06 08:54:53 +00:00
|
|
|
sleep 3
|
2017-04-28 19:22:01 +00:00
|
|
|
kill -0 $P 2>/dev/null && exit 1
|
|
|
|
$TMUX kill-server 2>/dev/null
|
|
|
|
|
|
|
|
exit 0
|