Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Bug when sending undefined from worker #2355

Closed
AndreasMadsen opened this issue Dec 17, 2011 · 1 comment
Closed

Bug when sending undefined from worker #2355

AndreasMadsen opened this issue Dec 17, 2011 · 1 comment
Labels

Comments

@AndreasMadsen
Copy link
Member

This one make a bug:

var cluster = require('cluster');

if (cluster.isWorker) {
  process.send(undefined);
} else {
  var child = cluster.fork();
}

Result: Unexpected token u

This is because of https://github.com/joyent/node/blob/master/lib/child_process.js#L100. It should also happen when using child_process.fork but it dose not. I suspect it has something to do with the jsonBuffer.

@bnoordhuis
Copy link
Member

Thanks for the report, Andreas. It's fixed in 6df7bdd.

richardlau pushed a commit to ibmruntimes/node that referenced this issue Sep 18, 2015
Notable changes:

* build: Add a --link-module option to configure that can be used to
  bundle additional JavaScript modules into a built binary
  (Bradley Meck) nodejs#2497
* docs: Merge outstanding doc updates from joyent/node
  (James M Snell) nodejs#2378
* http_parser: Significant performance improvement by having
  http.Server consume all initial data from its net.Socket and parsing
  directly without having to enter JavaScript. Any 'data' listeners on
  the net.Socket will result in the data being "unconsumed" into
  JavaScript, thereby undoing any performance gains.
  (Fedor Indutny) nodejs#2355
* libuv: Upgrade to 1.7.3 (from 1.6.1), see
  https://github.com/libuv/libuv/blob/v1.x/ChangeLog for details
  (Saúl Ibarra Corretgé) nodejs#2310
* V8: Upgrade to 4.4.63.30 (from 4.4.63.26) (Michaël Zasso) nodejs#2482
utterstep pushed a commit to lutik-inc/node that referenced this issue Sep 21, 2015
Notable changes:

* build: Add a --link-module option to configure that can be used to
  bundle additional JavaScript modules into a built binary
  (Bradley Meck) nodejs#2497
* docs: Merge outstanding doc updates from joyent/node
  (James M Snell) nodejs#2378
* http_parser: Significant performance improvement by having
  http.Server consume all initial data from its net.Socket and parsing
  directly without having to enter JavaScript. Any 'data' listeners on
  the net.Socket will result in the data being "unconsumed" into
  JavaScript, thereby undoing any performance gains.
  (Fedor Indutny) nodejs#2355
* libuv: Upgrade to 1.7.3 (from 1.6.1), see
  https://github.com/libuv/libuv/blob/v1.x/ChangeLog for details
  (Saúl Ibarra Corretgé) nodejs#2310
* V8: Upgrade to 4.4.63.30 (from 4.4.63.26) (Michaël Zasso) nodejs#2482

cherry-picked from v3.x @ 1a6e52d

PR-URL: nodejs/node#2653
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants