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

Running tree kill with superuser via command interface #14

Closed
alicecodes opened this issue May 11, 2016 · 2 comments
Closed

Running tree kill with superuser via command interface #14

alicecodes opened this issue May 11, 2016 · 2 comments

Comments

@alicecodes
Copy link

Hi,

I have a use case where I need to run tree-kill with elevated user privileges to kill a parent and its child processes.

One way to get this use case to work with tree-kill is to call it from the command line like this:

sudo treeKill [pid]

Thanks!

@billiegoose
Copy link
Collaborator

Hi Alice,
That should be pretty easy. Assuming you have NodeJS installed on your path, this ought to work:

#! /usr/bin/env node
kill = require('tree-kill')
kill(process.argv[2])

I'll consider adding a CLI command to the tree-kill package so it's easier to install

@billiegoose
Copy link
Collaborator

I'm done considering, consider it done. Update to v1.1.0 and you'll have a CLI.
asciicast

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

2 participants