Skip to content

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

@ProvokerDave

Description

@ProvokerDave

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 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions