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

Feature idea/request: Option to kill the ancestor's process tree #65

Open
ProvokerDave opened this issue Jul 30, 2022 · 0 comments
Open

Comments

@ProvokerDave
Copy link

ProvokerDave commented Jul 30, 2022

Killing a dotnet watch or nodemon process tree that hosts a listen port is never fun, but kill-port could actually make it fun!

My thought is kill-port could have an option to find the parent process of the process that is listening on the port and then kill the parent process' tree. Also, I can imagine, given how intermediate launch shell or node processes could be between the daemon watcher and the listening process, there should be a setting to indicate how many levels of ancestors to traverse up before doing the tree kill with the default being 1. So, something like:

kill-port --port 5000 --parent     # kills the parent process tree of the process listening on port 5000
kill-port --port 3000 --ancestor 3 # kills the great-grandparent process tree of the process listening on port 3000 
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

No branches or pull requests

1 participant