Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support tmux split-pane when restoring processes with ps strategy #518

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jyn514
Copy link

@jyn514 jyn514 commented Aug 13, 2024

normally, ps.sh takes the output of tmux list-panes -F "#{pane_pid}" and looks for all the children of that process with a controlling terminal, because that process is usually a shell. but if the process in a pane was spawned with tmux split-pane, it will have no parent process other than the tmux server itself.

support this use case by falling back to the active process if the active process has no children with a controlling terminal.

fixes #517

normally, `ps.sh` takes the output of `tmux list-panes -F
"#{pane_pid}"` and looks for all the children of that process with a
controlling terminal, because that process is usually a shell. but
if the process in a pane was spawned with `tmux split-pane`, it will
have no parent process other than the tmux server itself.

support this use case by falling back to the active process if the
active process has no children with a controlling terminal.
…erminal

look for the default command instead and then filter for its children
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resurrect-processes does not play well with tmux split-window <cmd>
1 participant