sindresorhus / fkill-cli

Fabulously kill processes. Cross-platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No way to specify signal to send

juancampa opened this issue · comments

Is there a way to specify the signal to send to the process?

I understand that fkill is multi-platform but at least in Unix environment people regularly use both TERM and KILL, and possibly others like HUP

Why do you need it?

Sometimes programs intercept SIGTERM and don't really die, so you need to send SIGKILL (i.e. kill -9 <pid>). It's the difference of pressing the "Quit" button vs the "Force Quit" in macOS

SIGHUP is typically used to make a daemon reload its settings (e.g. prometheus/prometheus#1572)

This might be out of scope of fkill but I'd suggest it works like this:

  • $ fkill
  • find the process you want to kill
  • either:
    • press enter to send SIGTERM (just like it works today)
    • press tab to go to a different menu where you can select the signal, and press enter to send it

If you're using --force it'll use SIGKILL. But I suppose we could allow the user to specify whichever signal they want to use behind a signal option or something. @sindresorhus, what do you think?

This CLI is for killing processes. Sending different signals is out of scope. We already support the most common use-case by killing normally or with --force. And in interactive mode, if killing a process fails, we offer to do it with force (SIGKILL).