Hello, chiming in, hope you don't mind :smile: 

The regexp for `RUBY_PLATFORM` is incorrect and is advised against it. If you want to determine if you're running on Windows, use `RbConfig::CONFIG["host_os"]` instead:

```ruby
require "rbconfig"

if RbConfig::CONFIG["host_os"] =~ /mingw|mswin/
  puts "Running Windows
else
  puts "Running something else"
end
```

Also the regexp was checking for `win`, which will match under Darwin:

```
irb(main):001:0> RUBY_PLATFORM =~ /mingw32|win/
=> 10
irb(main):003:0> RUBY_PLATFORM
=> "x86_64-darwin12.2.1"
```

Process management in Windows is complicated. `TERM` is listed because `TERM` works, but works differently, so does `INT`.

To be able to send proper termination messages to process spawned by you, you will have to use `:new_pgroup` option:

http://rubydoc.info/stdlib/core/Process.spawn

> The :new_pgroup key in options specifies to pass CREATE_NEW_PROCESS_GROUP flag to CreateProcessW() that is Windows API. > This option is only for Windows. true means the new process is the root process of the new process group. The new process has CTRL+C disabled. This flag is necessary for Process.kill(:SIGINT, pid) on the subprocess. :new_pgroup is false by default.

    pid = spawn(command, :new_pgroup=>true)  # new process group

I never played with poltergeist so dunno how it spawn the child process and what signal is required to break communication with it, but I can take a look if you guys want.

I assume @stealthcode already played with this and it works, but I'm not sure the child process is properly being terminated.