How to stop a process when tmux session is detached -
i have several tmux sessions running @ same time, in of these sessions have local server running on port. want able automatically kill server when detaching tmux session , re-start server when re-attaching.
is there in tmux makes easier, feels if there hook tmux provided run script before session detached or reattached trick can't see in docs.
fast forward 2017. today tmux has hooks called client-attached
, client-detached
run when clients attaches session or detaches it, respectively.
Comments
Post a Comment