Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug for the child_process,the error is EADDRINUSE #11175

Closed
4176244 opened this issue Feb 5, 2017 · 1 comment
Closed

debug for the child_process,the error is EADDRINUSE #11175

4176244 opened this issue Feb 5, 2017 · 1 comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@4176244
Copy link

4176244 commented Feb 5, 2017

i use the child_prcess,the document is
https://nodejs.org/api/child_process.html
Example: sending a socket object
it is error when i execute the code,and show "EADDRINUSE";

you can try to do:
the old code:
const normal = require('child_process').fork('child.js', ['normal'] );
const special = require('child_process').fork('child.js', ['special']);

the new code,it is ok:
const normal = require('child_process').fork('child.js', ['normal'], { execArgv: ['--debug=' + (process.debugPort + 1)] });
const special = require('child_process').fork('child.js', ['special'], { execArgv: ['--debug=' + (process.debugPort + 2)] });

@bnoordhuis
Copy link
Member

Closing, duplicate of #9435.

@bnoordhuis bnoordhuis added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Feb 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

2 participants