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

Windows: fork() function is unimplemented on this machine (NotImplementedError) #57

Open
hxhxd opened this Issue Jul 24, 2017 · 5 comments

Comments

Projects
None yet
4 participants
@hxhxd
Copy link

hxhxd commented Jul 24, 2017

Hello, I'm using ruby on windows, but daemons won't work because fork() is unimplemented on windows.
Is there a workaround for this?
Thanks.

D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/daemons-1.2.4/lib/daemons/daemonize.rb:10:in `fork': fork() function is unimplemented on this machine (NotImplementedError)
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/daemons-1.2.4/lib/daemons/daemonize.rb:10:in `safefork'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/daemons-1.2.4/lib/daemons/daemonize.rb:45:in `call_as_daemon'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/daemons-1.2.4/lib/daemons/application.rb:270:in `start_proc'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/daemons-1.2.4/lib/daemons/application.rb:296:in `start'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/daemons-1.2.4/lib/daemons/controller.rb:56:in `run'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/daemons-1.2.4/lib/daemons.rb:197:in `block in run_proc'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/daemons-1.2.4/lib/daemons/cmdline.rb:92:in `catch_exceptions'
        from D:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/daemons-1.2.4/lib/daemons.rb:196:in `run_proc'
        from DynDNS.rb:15:in `<main>'
@thuehlinger

This comment has been minimized.

Copy link
Owner

thuehlinger commented Jul 24, 2017

If you are using a native Ruby distribution there is currently no workaround. You could however use Cygwin where fork() supported.

@hxhxd

This comment has been minimized.

Copy link
Author

hxhxd commented Jul 26, 2017

Yeah I'm using native Ruby distribution, and need keep using it for a while.
I've tried install Cygwin version but there're problems when both native/Cygwin versions of Ruby installed.
I'll try Cygwin version only when native version no longer needed.
Thanks :)

@hxhxd hxhxd closed this Jul 26, 2017

@Timopheym

This comment has been minimized.

Copy link

Timopheym commented Nov 26, 2017

Is there actualy no possability to find it? Even the thing that guys find out?
vagrant-landrush/landrush#16
There is actual hell with dependecies to move the whole list of packages from native version (i know i am stupid doing development on window)

@thuehlinger

This comment has been minimized.

Copy link
Owner

thuehlinger commented Nov 26, 2017

Hmmm, I guess we might be able to mimick the behavior using spawn (as in the reference you have given: hferentschik/landrush@9523710#diff-695e5af033f2e918c112401dcbf9bfb1R63)... Let me look into this a bit...

@thuehlinger thuehlinger reopened this Nov 26, 2017

@magynhard

This comment has been minimized.

Copy link

magynhard commented Oct 9, 2018

I would appreciate it, if there will be a solution in future. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.