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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -