`TERM` signal results in `Errno::EINVAL: Invalid argument` thrown on that line. I believe you are right, if `INT` is not recognized by *NIX/OS X then we need to choose the signal based on the `RUBY_PLATFORM`.