Title: Child Process send incorrectly serializes values · Issue #5453 · nodejs/node · GitHub
Open Graph Title: Child Process send incorrectly serializes values · Issue #5453 · nodejs/node
X Title: Child Process send incorrectly serializes values · Issue #5453 · nodejs/node
Description: Code index.js const childProcess = require('child_process').fork(__dirname + '/worker.js'); childProcess.send('get-infinity'); childProcess.on('message', (valuePair) => { console.log(valuePair); }); worker.js process.on('message', () => ...
Open Graph Description: Code index.js const childProcess = require('child_process').fork(__dirname + '/worker.js'); childProcess.send('get-infinity'); childProcess.on('message', (valuePair) => { console.log(valuePair); })...
X Description: Code index.js const childProcess = require('child_process').fork(__dirname + '/worker.js'); childProcess.send('get-infinity'); childProcess.on('message', (valuePair)...
Opengraph URL: https://github.com/nodejs/node/issues/5453
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Child Process send incorrectly serializes values","articleBody":"# Code\n\nindex.js\n\n```\nconst childProcess = require('child_process').fork(__dirname + '/worker.js');\nchildProcess.send('get-infinity');\nchildProcess.on('message', (valuePair) =\u003e {\n console.log(valuePair);\n});\n```\n\nworker.js\n\n```\nprocess.on('message', () =\u003e {\n process.send(['Infinity', Infinity]);\n process.send(['NaN', NaN]);\n});\n```\n## Expected Result\n\n```\n['Infinity', Infinity]\n['NaN', NaN]\n```\n## Actual Result\n\n```\n['Infinity', null]\n['NaN', null]\n```\n- **Version**: _output of `node -v`\n\nv5.6.0\n- **Platform**: _either `uname -a` output, or if Windows, version and 32-bit or\n 64-bit\n\nLinux tido-tchaikovsky 3.19.0-51-generic #57~14.04.1-Ubuntu SMP Fri Feb 19 14:36:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux\n- **Subsystem**: _optional. if known - please specify affected core module name_\n\nchild_process\n","author":{"url":"https://github.com/jacobp100","@type":"Person","name":"jacobp100"},"datePublished":"2016-02-26T16:59:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/5453/node/issues/5453"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9c1d8897-054c-011b-fe42-609c14ba667c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A10:250534:6B02D9:9744F1:6A4E3938 |
| html-safe-nonce | 92daddafdf1f9d6bd71312f01bded04ecb4c8051bc77a5f21760ec8e0e0432de |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTEwOjI1MDUzNDo2QjAyRDk6OTc0NEYxOjZBNEUzOTM4IiwidmlzaXRvcl9pZCI6IjU5MDkxOTYyODQ1Nzc1OTM2NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 143121d55aef6d9e9b2bf753ce71d19b895d1611fee4279be2133c1393ca8cda |
| hovercard-subject-tag | issue:136753035 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/5453/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ef2ca4f593ba0c028046cda7d282822b14bdee3d3772733cfb817c49c2451fba/nodejs/node/issues/5453 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ef2ca4f593ba0c028046cda7d282822b14bdee3d3772733cfb817c49c2451fba/nodejs/node/issues/5453 |
| og:image:alt | Code index.js const childProcess = require('child_process').fork(__dirname + '/worker.js'); childProcess.send('get-infinity'); childProcess.on('message', (valuePair) => { console.log(valuePair); })... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jacobp100 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 42a6d378d7587a44c93aca255096cd66b7c8eb2d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width