Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemonization is broken in Windows #3

Closed
mcolyer opened this issue May 22, 2010 · 3 comments
Closed

Daemonization is broken in Windows #3

mcolyer opened this issue May 22, 2010 · 3 comments

Comments

@mcolyer
Copy link

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

@mcolyer
Copy link
Author

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
Copy link
Owner

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.

Thanks!
--AQ

@mcolyer
Copy link
Author

mcolyer commented May 25, 2010

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

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants