Skip to content

Instantly share code, notes, and snippets.

View luciancancescu's full-sized avatar

Lucian Cancescu luciancancescu

View GitHub Profile
@luciancancescu
luciancancescu / how_to_kill_processes_on_windows_using_ruby.md
Last active January 18, 2016 09:24
How to kill processes on Windows using Ruby

In order to terminate a process in Ruby you can use the kill method in the of the Process class in the following way:

pid = 1234
Process.kill("TERM", pid)

If you are using Ruby on Windows you have probably already noticed that Process.kill does not work correctly.

There are two problems with it: