You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)] });
The text was updated successfully, but these errors were encountered:
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)] });
The text was updated successfully, but these errors were encountered: