Created
March 26, 2010 00:50
-
-
Save Slashed/344334 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require("sys"); | |
var daemon = require("./daemon"); | |
// Do whatever initialization stuff you need here | |
var pid = daemon.start(); //Returns daemons PID | |
daemon.closeIO(); // Closes stdin, stdout, stderr | |
process.umask(027); //Change umask | |
process.chdir("/var/myserver"); //Change working directory | |
// Your daemon code goes here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment