{"issue":{"title":"var cwd = process.cwd();  Error: No such file or directory","user":{"login":"nodesocket","id":523312,"url":"https://api.github.com/users/nodesocket","avatar_url":"https://secure.gravatar.com/avatar/2b2068798fd58f433a7b0adacec83fdc?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2b2068798fd58f433a7b0adacec83fdc"},"created_at":"2011-12-27T02:06:44Z","milestone":null,"labels":[{"name":"low-priority","url":"https://api.github.com/repos/nodejitsu/forever/labels/low-priority","color":"02e10c"},{"name":"needs-investigation","url":"https://api.github.com/repos/nodejitsu/forever/labels/needs-investigation","color":"e102d8"}],"state":"closed","updated_at":"2011-12-28T07:08:54Z","id":2660870,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"closed_at":"2011-12-28T07:08:54Z","html_url":"https://github.com/nodejitsu/forever/issues/200","body":"We are seeing this following behavior often with forever.\r\n\r\nWhen starting an app, the following is logged to the error log over and over again:\r\n\r\n     node.js:289\r\n          var cwd = process.cwd();\r\n                      ^\r\n     Error: No such file or directory\r\n          at Function.resolveArgv0 (node.js:289:23)\r\n          at startup (node.js:43:13)\r\n          at node.js:448:3\r\n\r\nWe are running `node 4.1.2` and `forever 0.7.5`. Forever is instantiated like:\r\n\r\n    \t//Setup spawn child\r\n\t\tvar child = new(forever.Monitor)(torqueObject.start, {\r\n\t\t\tsilent: true,\r\n\t\t\tforever: true,\r\n\t\t\twatch: false,\r\n\t\t\tsourceDir: \"/nodesocket/gears/\" + gear,\r\n\t\t\toutFile: \"/nodesocket/gears/\" + gear + \"/logs/output.log\",\r\n\t\t\terrFile: \"/nodesocket/gears/\" + gear + \"/logs/error.log\",\r\n\t\t\tlogFile: \"/nodesocket/gears/\" + gear + \"/logs/forever.log\",\r\n\t\t\tpidFile: \"/etc/nodesocket/lever/pids\",\r\n\t\t\toptions: torqueObject.parameters,\r\n\t\t\tminUptime: 2000,\r\n\t\t\tspinSleepTime: 1000,\r\n\t\t\tkillTree: true,\r\n\t\t\tenv: torqueObject.env\r\n\t\t});\r\n\r\n        //Acutally spawn child\r\n\t\tchild.start();\r\n\r\nObviously its trying to get the current working directory, but failing. Any idea what specific code in forever is calling `process.cwd()`.","number":200,"url":"https://api.github.com/repos/nodejitsu/forever/issues/200","comments":2,"assignee":null},"comment":{"user":{"login":"indexzero","id":4624,"url":"https://api.github.com/users/indexzero","avatar_url":"https://secure.gravatar.com/avatar/d43e8ea63b61e7669ded5b9d3c2e980f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d43e8ea63b61e7669ded5b9d3c2e980f"},"created_at":"2011-12-28T07:08:54Z","updated_at":"2011-12-28T07:08:54Z","id":3288685,"body":"@nodesocket This is not an issue in forever. A simple search in all files in the forever repository for `process.cwd()` reveals only three locations:\r\n\r\n* In example code (not library code):\r\n  1. `examples/chroot.js` https://github.com/nodejitsu/forever/blob/master/examples/chroot.js#L10\r\n  2. `examples/custom-cwd.js` https://github.com/nodejitsu/forever/blob/master/examples/custom-cwd.js#L1\r\n\r\n* In CLI code (not library code): \r\n  1. https://github.com/nodejitsu/forever/blob/master/lib/forever/cli.js#L182\r\n\r\nIt is also references once in `nconf` and once in `optimist`, but given the breadth to which these dependencies are used across all of our projects and the short stack track being logged I suspect it may be a reference to `process.cwd()` in your own code. \r\n\r\n","url":"https://api.github.com/repos/nodejitsu/forever/issues/comments/3288685"},"action":"created"}