Can I send a ctrl-C (SIGINT) to an application on Windows?

前端 未结 17 2599
甜味超标
甜味超标 2020-11-22 09:15

I have (in the past) written cross-platform (Windows/Unix) applications which, when started from the command line, handled a user-typed Ctrl-C combinat

17条回答
  •  無奈伤痛
    2020-11-22 09:42

    Based on process id, we can send the signal to process to terminate forcefully or gracefully or any other signal.

    List all process :

    C:\>tasklist
    

    To kill the process:

    C:\>Taskkill /IM firefox.exe /F
    or
    C:\>Taskkill /PID 26356 /F
    

    Details:

    http://tweaks.com/windows/39559/kill-processes-from-command-prompt/

提交回复
热议问题