mirror of
https://github.com/tmux/tmux.git
synced 2024-11-16 01:18:52 +00:00
Test that kill-session closes the panes (processes end up dead).
This commit is contained in:
parent
e4b4125310
commit
abad809e7a
21
regress/kill-session-process-exit.sh
Normal file
21
regress/kill-session-process-exit.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
$TMUX new -d 'sleep 1000' || exit 1
|
||||||
|
P=$($TMUX display -pt0:0.0 '#{pane_pid}')
|
||||||
|
$TMUX new -d || exit 1
|
||||||
|
sleep 1
|
||||||
|
$TMUX kill-session -t0:
|
||||||
|
sleep 1
|
||||||
|
kill -0 $P 2>/dev/null && exit 1
|
||||||
|
$TMUX kill-server 2>/dev/null
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user