Code Monkey home page Code Monkey logo

Comments (4)

AvianFlu avatar AvianFlu commented on June 19, 2024

You can try to make sure you're using [email protected], or you can try my node-prefork, but really, you should just move to node 0.8.x.

If you fork a node 0.6 process, you lose the thread pool. Period. It won't work.

If you use node 0.8, you can use the detached option to child_process.spawn to achieve the same kind of daemonization - but the direct forking that these modules try to do just won't work with node anymore.

from daemon.node.

jhs avatar jhs commented on June 19, 2024

Thanks. I'm on node 0.8.1, which is why I was surprised to see the error. Are you saying that this package works on 0.8, or that I should just use the detached option in spawn?

The detached option does runs setsid(); however I don't want to shell out a subprocess, I want to fork into the background! But yeah, if you say that is more reliable (and I assume you know that from hard-won experience) then I'll just have the program spawn itself, detached, or something similar.

Thanks!

from daemon.node.

indexzero avatar indexzero commented on June 19, 2024

@jhs in forever we spawn bin/forever as a detached child process, then spawn the child-process.

from daemon.node.

jhs avatar jhs commented on June 19, 2024

Thanks, all. I think we can close this ticket as having several workarounds identified.

from daemon.node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.