FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: buffers are not sent over IPC with a socket by timkuijsten · Pull Request #6951 · nodejs/node · GitHub

/ node Public

doc: buffers are not sent over IPC with a socket - #6951

Closed
timkuijsten wants to merge 1 commit into
nodejs:masterfrom
Netsend:ipc-buffers
Closed

doc: buffers are not sent over IPC with a socket#6951
timkuijsten wants to merge 1 commit into
nodejs:masterfrom
Netsend:ipc-buffers

Conversation

Copy link
Copy Markdown
Contributor
Checklist
  • documentation is changed or added
  • the commit message follows commit guidelines
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.

nodejs-github-bot added the doc Issues and PRs related to the documentations. label May 24, 2016
Comment thread doc/api/child_process.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This sentence seems incomplete. I would just stop after "will not be sent to the child." and remove the rest.

cjihrig commented May 24, 2016

Copy link
Copy Markdown
Contributor

One comment, but LGTM.

Copy link
Copy Markdown
Contributor Author

updated + added a new finding while trying to work around the issue myself.

Comment thread doc/api/child_process.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Have you seen the keepOpen option to send()?

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.

Copy link
Copy Markdown
Contributor Author

No I had not, tnx! Updated the diff.

addaleax added the child_process Issues and PRs related to the child_process subsystem. label May 29, 2016

Copy link
Copy Markdown
Member

LGTM, landing this…

Copy link
Copy Markdown
Member

Landed in 5207526. Thank you!

addaleax closed this May 29, 2016
addaleax pushed a commit that referenced this pull request May 29, 2016
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>
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request May 30, 2016
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>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
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>

Copy link
Copy Markdown
Contributor

this is not landing cleanly, and I'm not 100% it applies to v4.x

Please backport if neccessary

Copy link
Copy Markdown
Contributor Author

this is not landing cleanly, and I'm not 100% it applies to v4.x

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

MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
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>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
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>
MylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
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>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL