Skip to content

Daemonization is broken in Windows #3

mcolyer opened this Issue May 22, 2010 · 3 comments

2 participants

mcolyer commented May 22, 2010

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 ( 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.

mcolyer commented May 22, 2010

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.

quirkey commented May 24, 2010

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.


mcolyer commented May 25, 2010

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

@Leonas Leonas referenced this issue in bobthecow/genghis Nov 11, 2012

Error when running on windows #54

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.