| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This sentence seems incomplete. I would just stop after "will not be sent to the child." and remove the rest.
Sorry, something went wrong.
|
One comment, but LGTM. |
Sorry, something went wrong.
|
updated + added a new finding while trying to work around the issue myself. |
Sorry, something went wrong.
There was a problem hiding this comment.
Have you seen the keepOpen option to send()?
Sorry, something went wrong.
If a socket is sent to a child, any data that is buffered in the socket will not be sent to the child. The child will only receive data from the socket that is sent after the child has the socket.
|
No I had not, tnx! Updated the diff. |
Sorry, something went wrong.
|
LGTM, landing this… |
Sorry, something went wrong.
If a socket is sent to a child, any data that is buffered in the socket will not be sent to the child. The child will only receive data from the socket that is sent after the child has the socket. PR-URL: #6951 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
If a socket is sent to a child, any data that is buffered in the socket will not be sent to the child. The child will only receive data from the socket that is sent after the child has the socket. PR-URL: nodejs#6951 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
If a socket is sent to a child, any data that is buffered in the socket will not be sent to the child. The child will only receive data from the socket that is sent after the child has the socket. PR-URL: #6951 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
this is not landing cleanly, and I'm not 100% it applies to v4.x Please backport if neccessary |
Sorry, something went wrong.
It does apply to v4.x as well: $ node --version
v4.4.7$ cat m.js
const fork = require('child_process').fork
const net = require('net')
const cp = fork('./child.js')
net.createServer(c => {
setTimeout(() => {
cp.send({}, c)
}, 500) // send the connection after a delay
}).listen(1234, () => {
net.createConnection(1234, function() {
var i = 0
setInterval(() => {
this.write(`${i++} `)
}, 100) // start sending data before the connection is sent to the child
})
})$ cat child.js
process.on('message', (m, c) => {
console.log('child: got connection')
c.pipe(process.stdout)
})$ node m.js
child: got connection
4 5 6 7 8 ^C |
Sorry, something went wrong.
If a socket is sent to a child, any data that is buffered in the socket will not be sent to the child. The child will only receive data from the socket that is sent after the child has the socket. PR-URL: #6951 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
If a socket is sent to a child, any data that is buffered in the socket will not be sent to the child. The child will only receive data from the socket that is sent after the child has the socket. PR-URL: #6951 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
If a socket is sent to a child, any data that is buffered in the socket will not be sent to the child. The child will only receive data from the socket that is sent after the child has the socket. PR-URL: #6951 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
If a socket is sent to a child, any data that is buffered in the socket will not be sent to the child. The child will only receive data from the socket that is sent after the child has the socket. PR-URL: #6951 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
doc/child_process
Description of change
If a socket is sent to a child, any data that is buffered in the
socket will not be sent to the child. The child will only receive
data from the socket that is sent after the child has the socket.