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

On macOS Sierra 10.12, fkill --force by process name throws exception because pkill does not support -9 flag #24

Closed
sompylasar opened this issue Mar 24, 2018 · 1 comment

Comments

@sompylasar
Copy link

$ fkill --force node
AggregateError: 
    Error: Killing process node failed: pkill: illegal option -- 9
    usage: pkill [-signal] [-ILfilnovx] [-F pidfile] [-G gid]
                 [-P ppid] [-U uid] [-g pgrp]
                 [-t tty] [-u euid] pattern ...
        at Array.map (<anonymous>)
        at processExists.all.then.then (/Users/ivanbabak/.nvm/versions/node/v8.7.0/lib/node_modules/fkill-cli/node_modules/fkill/index.js:83:10)
        at <anonymous>
    at processExists.all.then.then (/Users/ivanbabak/.nvm/versions/node/v8.7.0/lib/node_modules/fkill-cli/node_modules/fkill/index.js:83:10)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

fkill/index.js

Lines 16 to 23 in 23503ec

function macOSKill(input, opts) {
const killByName = typeof input === 'string';
const cmd = killByName ? 'pkill' : 'kill';
const args = [input];
if (opts.force) {
args.unshift('-9');
}

@sindresorhus
Copy link
Owner

Not interested in supporting macOS 10.12.

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