From 6cd64f36bce4e477d57e7cc3208c6582ad99304e Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 11 May 2017 13:36:31 +0800 Subject: [PATCH] doc: note caveats in process message serialization The message sent using process.send() goes through JSON serialization and parsing, which could lead to surprising behaviors. This commit elaborate a bit more on this and add a link to the notes about these caveats in the ECMAScript specification. PR-URL: https://github.com/nodejs/node/pull/12963 Refs: https://github.com/nodejs/node/issues/12497 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Vse Mozhet Byt Reviewed-By: Ruben Bridgewater --- doc/api/child_process.md | 13 ++++++++++++- doc/api/process.md | 11 ++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) mode change 100644 => 100755 doc/api/child_process.md diff --git a/doc/api/child_process.md b/doc/api/child_process.md old mode 100644 new mode 100755 index 87e85f3b14f..4e9415df069 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -891,6 +891,10 @@ added: v0.5.9 The `'message'` event is triggered when a child process uses [`process.send()`][] to send messages. +*Note*: The message goes through JSON serialization and parsing. The resulting +message might not be the same as what is originally sent. See notes in +[the `JSON.stringify()` specification][`JSON.stringify` spec]. + ### subprocess.channel