zombocom/rack-timeout

PR needed/wanted: Incompatibility with Ruby on Windows

sunbinyuan opened this issue · 1 comments

When running an application using rack-timeout on Windows 10, I got the error message Current Runtime does not support processes. By digging into the source file, it looks like the error is raised unless ::Process.respond_to?(:fork). It would seem by looking at the documentation on Ruby 3 that fork is not supported on Windows system: https://ruby-doc.org/core-3.0.0/Process.html#method-c-fork.

Thanks for the report!

The way around this is to use defined?(::Process) && ::Process.respond_to?(:fork) can you send me a PR with that update? Also I know basically nothing about github actions but assume they have a windows runner? I would accept two different PRs:

  • Check process is defined before checking if it can fork
  • Add tests for running this gem on windows