Comments (4)
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.
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.
@jhs in forever
we spawn bin/forever
as a detached child process, then spawn the child-process.
from daemon.node.
Thanks, all. I think we can close this ticket as having several workarounds identified.
from daemon.node.
Related Issues (20)
- http.get no longer works after daemon.start() HOT 3
- Unable to load shared library /Users/gabriel/app/node_modules/forever/node_modules/daemon/lib/daemon.v0.6.11.node HOT 6
- binding sockets by hostnames fails HOT 2
- Windows compatability? HOT 1
- Object #<Object> has no method 'daemonize' HOT 4
- console.log no longer working HOT 3
- Request: error on failed lock HOT 4
- Error during installation on OSX Mountain Lion (10.8.1) HOT 1
- nvm and daemon.node HOT 2
- setup travis-ci HOT 2
- process.on('exit', cb) does not fire from child HOT 2
- Wrong example code for daemon. Printing to stdout without setting it to any file after daemon HOT 2
- does not work with cluster HOT 1
- Arguments passed to node aren't applied to daemonized process HOT 1
- Clarification on daemon management once daemon running? HOT 2
- Daemon fork doesn't inherit Node CLI flags such as --enable_gc
- TypeError: "cwd" must be a string on Node 8 HOT 13
- daemon not running or user not authorized to see process
- Please add license to package.json HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from daemon.node.