middleman/middleman — Issue #224: There is no fork() under Windows for `middleman server`
Author: luislavena
Created: 2012-01-03 18:13:26+00:00
State: open

Hello,

Middleman 3.0.0.beta.1, attempted to run `middleman server` on a fresh `middleman init` resulted in:

```
C:\Users\Luis\Projects\playground\foo>middleman server
== The Middleman is loading
C:/Users/Luis/.gem/ruby/x86-mingw32/1.9.1/gems/middleman-core-3.0.0.beta.1/lib/middleman-core/watcher.rb:63:in `fork': fork() function is unimplemented on this machine (NotImplementedError)
from C:/Users/Luis/.gem/ruby/x86-mingw32/1.9.1/gems/middleman-core-3.0.0.beta.1/lib/middleman-core/watcher.rb:63:in `start'
from C:/Users/Luis/.gem/ruby/x86-mingw32/1.9.1/gems/middleman-core-3.0.0.beta.1/lib/middleman-core/watcher.rb:41:in `initialize'
from C:/Users/Luis/.gem/ruby/x86-mingw32/1.9.1/gems/middleman-core-3.0.0.beta.1/lib/middleman-core/watcher.rb:13:in `new'
```

That is because `fork()` do not exist on the platform.

I'm using Ruby 1.9.3-p0, so perhaps instead of forking a thread will be better?

If not (due signal trapping), then a warning will be recommended.

Thank you.