{"_id":"daemon","_rev":"207652","name":"daemon","description":"Add-on for creating *nix daemons","dist-tags":{"latest":"1.1.0","stable":"0.1.0"},"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"time":{"modified":"2021-06-03T13:45:56.000Z","created":"2011-02-11T15:13:23.258Z","1.1.0":"2013-04-02T19:04:11.179Z","1.0.0":"2013-03-14T18:29:44.751Z","0.5.1":"2012-05-17T01:11:59.218Z","0.5.0":"2012-05-11T19:27:31.564Z","0.4.1":"2012-01-06T22:00:42.220Z","0.4.0":"2011-10-22T08:02:45.198Z","0.3.2":"2011-10-09T03:40:26.980Z","0.3.0":"2011-02-11T15:13:23.258Z","0.1.0":"2011-02-11T15:13:23.258Z"},"users":{"fgribreau":true,"hyq":true,"susu":true,"pragmadash":true,"lafikl":true,"nickeljew":true,"thebespokepixel":true,"tobias.istvan":true,"dgarlitt":true,"bigbrickwillie":true,"nathanbuchar":true,"52u":true,"shujianbu":true,"jennanuttscullycitizenhearst":true,"shangsinian":true,"banyudu":true,"zdying":true,"itaditya":true,"stormcrows":true,"ankitjain28":true},"author":{"name":"Roman Shtylman","email":"shtylman@gmail.com"},"repository":{"type":"git","url":"http://github.com/indexzero/daemon.node.git"},"versions":{"1.1.0":{"name":"daemon","version":"1.1.0","description":"Add-on for creating *nix daemons","author":{"name":"Roman Shtylman","email":"shtylman@gmail.com"},"contributors":[{"name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"},{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Zak Taylor","email":"zak@dobl.com"},{"name":"Daniel Bartlett","email":"dan@f-box.org"},{"name":"Charlie McConnell","email":"charlie@charlieistheman.com"},{"name":"Josh Holbrook","email":"josh@nodejitsu.com"},{"name":"Arthur","email":"arthur@norgic.com","url":"Slashed"}],"repository":{"type":"git","url":"http://github.com/indexzero/daemon.node.git"},"scripts":{"test":"mocha --ui qunit test/*.js"},"devDependencies":{"mocha":"1.8.1","after":"0.6.0"},"main":"./index.js","engines":{"node":">= 0.8.0"},"readmeFilename":"README.md","_id":"daemon@1.1.0","dist":{"shasum":"6c5102c81db0be856fc9008fc2c935b398864ae8","size":3686,"noattachment":false,"key":"/daemon/-/daemon-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/daemon/download/daemon-1.1.0.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"shtylman","email":"shtylman@gmail.com"},"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{},"publish_time":1364929451179,"_cnpm_publish_time":1364929451179,"_hasShrinkwrap":false},"1.0.0":{"name":"daemon","version":"1.0.0","description":"Add-on for creating *nix daemons","author":{"name":"Roman Shtylman","email":"shtylman@gmail.com"},"contributors":[{"name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"},{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Zak Taylor","email":"zak@dobl.com"},{"name":"Daniel Bartlett","email":"dan@f-box.org"},{"name":"Charlie McConnell","email":"charlie@charlieistheman.com"},{"name":"Josh Holbrook","email":"josh@nodejitsu.com"},{"name":"Arthur","email":"arthur@norgic.com","url":"Slashed"}],"repository":{"type":"git","url":"http://github.com/indexzero/daemon.node.git"},"scripts":{"test":"mocha --ui qunit test/*.js"},"devDependencies":{"mocha":"1.8.1","after":"0.6.0"},"main":"./index.js","engines":{"node":">= 0.8.0"},"readmeFilename":"README.md","_id":"daemon@1.0.0","dist":{"shasum":"8dd4a2b9940b82ce933a3b9d7cdc00f6e5d25cb6","size":3351,"noattachment":false,"key":"/daemon/-/daemon-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/daemon/download/daemon-1.0.0.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"shtylman","email":"shtylman@gmail.com"},"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{},"publish_time":1363285784751,"_cnpm_publish_time":1363285784751,"_hasShrinkwrap":false},"0.5.1":{"name":"daemon","version":"0.5.1","description":"Add-on for creating *nix daemons","author":{"name":"Arthur","email":"arthur@norgic.com","url":"Slashed"},"contributors":[{"name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"},{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Zak Taylor","email":"zak@dobl.com"},{"name":"Daniel Bartlett","email":"dan@f-box.org"},{"name":"Charlie McConnell","email":"charlie@charlieistheman.com"},{"name":"Josh Holbrook","email":"josh@nodejitsu.com"}],"repository":{"type":"git","url":"git://github.com/indexzero/daemon.node.git"},"devDependencies":{"vows":"0.6.x"},"main":"./lib/daemon","scripts":{"preinstall":"bash ./install"},"engines":{"node":">= 0.4.0"},"_npmUser":{"name":"avianflu","email":"charlie@charlieistheman.com"},"_id":"daemon@0.5.1","dependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"c16611b6f3057fd6c34c4c66ce60ad1cbc745ab6","size":7544,"noattachment":false,"key":"/daemon/-/daemon-0.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/daemon/download/daemon-0.5.1.tgz"},"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{},"publish_time":1337217119218,"_cnpm_publish_time":1337217119218,"_hasShrinkwrap":false},"0.5.0":{"name":"daemon","version":"0.5.0","description":"Add-on for creating *nix daemons","author":{"name":"Arthur","email":"arthur@norgic.com","url":"Slashed"},"contributors":[{"name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"},{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Zak Taylor","email":"zak@dobl.com"},{"name":"Daniel Bartlett","email":"dan@f-box.org"},{"name":"Charlie McConnell","email":"charlie@charlieistheman.com"}],"repository":{"type":"git","url":"git://github.com/indexzero/daemon.node.git"},"devDependencies":{"vows":"0.6.x"},"main":"./lib/daemon","scripts":{"preinstall":"bash ./install"},"engines":{"node":">= 0.4.0"},"_npmUser":{"name":"avianflu","email":"charlie@charlieistheman.com"},"_id":"daemon@0.5.0","dependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.16","_defaultsLoaded":true,"dist":{"shasum":"c2c8bcba6ce61e25234f449c3c54a39142e7bc71","size":7165,"noattachment":false,"key":"/daemon/-/daemon-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/daemon/download/daemon-0.5.0.tgz"},"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{},"publish_time":1336764451564,"_cnpm_publish_time":1336764451564,"_hasShrinkwrap":false},"0.4.1":{"name":"daemon","version":"0.4.1","description":"Add-on for creating *nix daemons","author":{"name":"Arthur","email":"arthur@norgic.com","url":"Slashed"},"contributors":[{"name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"},{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Zak Taylor","email":"zak@dobl.com"},{"name":"Daniel Bartlett","email":"dan@f-box.org"}],"repository":{"type":"git","url":"git://github.com/indexzero/daemon.node.git"},"devDependencies":{"vows":"0.5.x"},"main":"./lib/daemon","scripts":{"preinstall":"bash ./install"},"engines":{"node":">= 0.4.0"},"_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"_id":"daemon@0.4.1","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"bbbc3d6d99b3420c3a502deaf013ce03b6e523a0","size":20480,"noattachment":false,"key":"/daemon/-/daemon-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/daemon/download/daemon-0.4.1.tgz"},"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{},"publish_time":1325887242220,"_cnpm_publish_time":1325887242220,"_hasShrinkwrap":false},"0.4.0":{"name":"daemon","version":"0.4.0","description":"Add-on for creating *nix daemons","author":{"name":"Arthur","email":"arthur@norgic.com","url":"Slashed"},"contributors":[{"name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"},{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Zak Taylor","email":"zak@dobl.com"},{"name":"Daniel Bartlett","email":"dan@f-box.org"}],"repository":{"type":"git","url":"git://github.com/indexzero/daemon.node.git"},"devDependencies":{"vows":"0.5.x"},"main":"./lib/daemon","scripts":{"preinstall":"node-waf configure build"},"engines":{"node":">= 0.4.0"},"_npmJsonOpts":{"file":"/Users/Charlie/.npm/daemon/0.4.0/package/package.json","contributors":false,"serverjs":false,"wscript":true},"_id":"daemon@0.4.0","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.23","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"060cd95276646563bdb5fa1d398e009a577c13cd","size":7469,"noattachment":false,"key":"/daemon/-/daemon-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/daemon/download/daemon-0.4.0.tgz"},"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{},"publish_time":1319270565198,"_cnpm_publish_time":1319270565198,"_hasShrinkwrap":false},"0.3.2":{"name":"daemon","version":"0.3.2","description":"Add-on for creating *nix daemons","author":{"name":"Arthur","email":"arthur@norgic.com","url":"Slashed"},"contributors":[{"name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"},{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Zak Taylor","email":"zak@dobl.com"},{"name":"Daniel Bartlett","email":"dan@f-box.org"}],"repository":{"type":"git","url":"git://github.com/indexzero/daemon.node.git"},"main":"./lib/daemon","scripts":{"preinstall":"node-waf configure build"},"engines":{"node":">= 0.4.0"},"_npmJsonOpts":{"file":"/Users/Charlie/.npm/daemon/0.3.2/package/package.json","contributors":false,"serverjs":false,"wscript":true},"_id":"daemon@0.3.2","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.23","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"15a100e841693869e7afa7c7ca6f1c7f4ebe4857","size":6054,"noattachment":false,"key":"/daemon/-/daemon-0.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/daemon/download/daemon-0.3.2.tgz"},"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{},"publish_time":1318131626980,"_cnpm_publish_time":1318131626980,"_hasShrinkwrap":false},"0.3.0":{"name":"daemon","version":"0.3.0","description":"Add-on for creating *nix daemons","author":{"name":"Arthur","email":"arthur@norgic.com","url":"Slashed"},"contributors":[{"name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"},{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Zak Taylor","email":"zak@dobl.com"},{"name":"Daniel Bartlett","email":"dan@f-box.org"}],"repository":{"type":"git","url":"http://github.com/indexzero/daemon.node.git"},"main":"./lib/daemon","scripts":{"preinstall":"node-waf configure build"},"engines":{"node":">= 0.4.0"},"_id":"daemon@0.3.0","_engineSupported":true,"_npmVersion":"0.2.18","_nodeVersion":"v0.4.0","directories":{"lib":"./lib"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"20a36bfa331c2629c64af4f0d0094a8b8d90d158","size":6157,"noattachment":false,"key":"/daemon/-/daemon-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/daemon/download/daemon-0.3.0.tgz"},"publish_time":1297437203258,"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"_cnpm_publish_time":1297437203258,"_hasShrinkwrap":false},"0.1.0":{"name":"daemon","version":"0.1.0","description":"Add-on for creating *nix daemons","author":{"name":"Arthur","email":"arthur@norgic.com","url":"Slashed"},"contributors":[{"name":"Pedro Teixeira","email":"pedro.teixeira@gmail.com"},{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Zak Taylor","email":"zak@dobl.com"}],"repository":{"type":"git","url":"http://github.com/indexzero/daemon.node.git"},"main":"./lib/daemon","scripts":{"preinstall":"node-waf configure build"},"engines":{"node":">= 0.1.97"},"_id":"daemon@0.1.0","_nodeSupported":true,"_npmVersion":"0.2.5-1","_nodeVersion":"v0.3.0","dist":{"shasum":"23c57cb5e34cd925b66954b074dbf50c3f568125","size":5186,"noattachment":false,"key":"/daemon/-/daemon-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/daemon/download/daemon-0.1.0.tgz"},"directories":{},"publish_time":1297437203258,"maintainers":[{"name":"defunctzombie","email":""},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"_cnpm_publish_time":1297437203258,"_hasShrinkwrap":false}},"readme":"# daemon\n\n[![Build Status](https://secure.travis-ci.org/indexzero/daemon.node.png)](http://travis-ci.org/indexzero/daemon.node)\n\nTurn a node script into a daemon.\n\n## install via npm\n\n```\nnpm install daemon\n```\n\nRequires node >= 0.8\n\n## examples\n\n```javascript\n// this code is run twice\n// see implementation notes below\nconsole.log(process.pid);\n\n// after this point, we are a daemon\nrequire('daemon')();\n\n// different pid because we are now forked\n// original parent has exited\nconsole.log(process.pid);\n```\n\n## api\n\n### daemon()\n\nRespawn the process (self) as a daemon. The parent process will exit at the point of this call.\n\n### daemon.daemon(script, args, opt)\n\nSpawn the `script` with given `args` array as a daemonized process. Return the `child` process object.\n\nopt can optionally contain the following arguments:\n* stdout (file descriptor for stdout of the daemon)\n* stderr (file descriptor for stderr of the daemon)\n* env (environment for the daemon) (default: process.env)\n* cwd (current working directory for daemonized script) (default: process.cwd)\n\n## implementation notes\n\nDaemon actually re-spawns the current application and runs it again. The only difference between the original and the fork is that the original will not execute past the `daemon()` call whereas the fork will.\n\n## node versions prior to 0.8\n\nUsing this module on older versions of node (or older versions of this module) are not recommended due to how node works internally and the issues it can cause for daemons.\n\n## Contributors\n[Charlie Robbins](http://nodejitsu.com)  \n[Pedro Teixeira](https://github.com/pgte)  \n[James Halliday](https://github.com/substack)  \n[Zak Taylor](https://github.com/dobl)  \n[Daniel Bartlett](https://github.com/danbuk)  \n[Charlie McConnell](https://github.com/AvianFlu)  \n[Slashed](http://github.com/slashed)  \n[Roman Shtylman](http://github.com/shtylman)  \n\n","_attachments":{},"readmeFilename":"README.md"}