Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

`supervisor file.js` just hangs on Windows 7 #90

Closed
davidmurdoch opened this Issue Feb 12, 2013 · 3 comments

Comments

Projects
None yet
2 participants

Supervisor does not appear to be working properly on Windows 7.

supervisor was installed with npm install supervisor -g

running supervior file.js starts up a node processes that then consumes 13% CPU and uses just under 10K memory; these values do not appear to change or fluctuate at all.

The contents of file.js are simply: 'console.log('hi');' and nothing else.

node -v is v0.8.19

supervisor is installed at: C:\Users{name}\AppData\Roaming\npm\

I've also tried this on a basic express.js web app and get the same results.

p.s. I've tried restarting and I've tried running from both PowerShell and cmd.exe.

FYI: While debugging this I discovered that if arguments (process.argv) are omitted the while loop in cli-wrapper.js is essentially just a while(true){}.

Ah, this is because my User's directory is symlinked from another drive.

My arg[0] was:

C:\Users\{user}\AppData\Roaming\npm\node_modules\supervisor\lib\cli-wrapper.js while __filename was
D:\Users\{user}\AppData\Roaming\npm\node_modules\supervisor\lib\cli-wrapper.js

Replacing while ( arg !== __filename ) with while ( fs.realpathSync(arg) !== __filename ) fixes the issue (for me).

I'm betting that __filename is always the "real path" of the file here, if this isn't always true, __filename will need to be normalized to it's "real path" as well.

Collaborator

iangreenleaf commented Feb 18, 2013

Closed by 39f56fa.

@fza fza pushed a commit to fza/node-supervisor that referenced this issue Nov 4, 2014

@iangreenleaf iangreenleaf Merge pull request #91 from davidmurdoch/master
Fix issue #90: `supervisor file.js` might hang
39f56fa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment