nodejitsu/forever — Issue #200: var cwd = process.cwd();  Error: No such file or directory
Author: nodesocket
Created: 2011-12-27 02:06:44+00:00
State: open

We are seeing this following behavior often with forever.

When starting an app, the following is logged to the error log over and over again:

node.js:289
var cwd = process.cwd();
^
Error: No such file or directory
at Function.resolveArgv0 (node.js:289:23)
at startup (node.js:43:13)
at node.js:448:3

We are running `node 4.1.2` and `forever 0.7.5`. Forever is instantiated like:

//Setup spawn child
var child = new(forever.Monitor)(torqueObject.start, {
silent: true,
forever: true,
watch: false,
sourceDir: "/nodesocket/gears/" + gear,
outFile: "/nodesocket/gears/" + gear + "/logs/output.log",
errFile: "/nodesocket/gears/" + gear + "/logs/error.log",
logFile: "/nodesocket/gears/" + gear + "/logs/forever.log",
pidFile: "/etc/nodesocket/lever/pids",
options: torqueObject.parameters,
minUptime: 2000,
spinSleepTime: 1000,
killTree: true,
env: torqueObject.env
});

//Acutally spawn child
child.start();

Obviously its trying to get the current working directory, but failing. Any idea what specific code in forever is calling `process.cwd()`.