quirkey / vegas

Vegas aims to solve the simple problem of creating executable versions of Sinatra/Rack apps.

Home Page:http://code.quirkey.com/vegas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Daemonization is broken in Windows

mcolyer opened this issue · comments

In version 0.1.6, daemonization fails to work correctly in Windows. While a second process correctly starts, it loses all of the option state from the original program.

I believe this is caused by the fact that win32-process is faking Process.fork and instead uses something called CreateProcess (http://rubyforge.org/docman/view.php/85/1720/Kernel.html#M000007) which creates an entirely new copy of the program and doesn't resume execution from the line after fork like it does in Unix.

I am going to try to debug this further but thought you might have some better ideas of how to fix it.

Okay I did some further digging, it turns out it's just command line arguments that are ignored by the child process. If I specify all of the options in the call to Runner than it works.

I am really not sure how you would fix this as it seems like a limitation of CreateProcess.

Hey mcolyer

Thanks for looking into this. It took a ton of work to get anything working on windows and I believe where I am is just a wall of ruby on windows. I'm happy to take patches but beyond that I think I've exhausted my effort on this so I'm going to close the ticket.

Thanks!
--AQ

Wait, can't you atleast put a warning in the README?