0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Ben Noordhuis 607aa3ac82 child_process: add callback parameter to .send()
Add an optional callback parameter to `ChildProcess.prototype.send()`
that is invoked when the message has been sent.

Juggle the control channel's reference count so that in-flight messages
keep the event loop (and therefore the process) alive until they have
been sent.

`ChildProcess.prototype.send()` and `process.send()` used to operate
synchronously but became asynchronous in commit libuv/libuv@393c1c5
("unix: set non-block mode in uv_{pipe,tcp,udp}_open"), which landed
in io.js in commit 07bd05b ("deps: update libuv to 1.2.1").

Fixes: https://github.com/nodejs/node/issues/760
PR-URL: https://github.com/nodejs/node/pull/2620
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
2015-09-06 21:37:58 +10:00
..
internal child_process: add callback parameter to .send() 2015-09-06 21:37:58 +10:00
_debug_agent.js
_debugger.js debugger: use strict equality comparison 2015-08-26 13:22:55 -07:00
_http_agent.js http: fix agent.getName() and add tests 2015-08-04 11:56:17 -07:00
_http_client.js doc: fix comments in tls_wrap.cc and _http_client.js 2015-08-23 09:01:22 -07:00
_http_common.js
_http_incoming.js
_http_outgoing.js http: Check this.connection before using it 2015-07-22 21:44:59 +05:30
_http_server.js http_parser: consume StreamBase instance 2015-08-26 12:45:22 -07:00
_linklist.js
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js stream: rename poorly named function 2015-08-24 20:24:15 +02:00
_stream_transform.js
_stream_wrap.js _stream_wrap: prevent use after free in TLS 2015-06-30 20:09:22 -07:00
_stream_writable.js util: prepend '(node) ' to deprecation messages 2015-07-03 16:32:29 +02:00
_tls_common.js
_tls_legacy.js lib: don't use global Buffer 2015-06-11 20:24:44 +02:00
_tls_wrap.js stream_base: various improvements 2015-08-20 01:14:37 -07:00
assert.js lib: don't use global Buffer 2015-06-11 20:24:44 +02:00
buffer.js src: fix memory leak in ExternString 2015-09-06 21:37:37 +10:00
child_process.js child_process: add callback parameter to .send() 2015-09-06 21:37:58 +10:00
cluster.js cluster: do not unconditionally set --debug-port 2015-08-04 11:56:12 -07:00
console.js
constants.js
crypto.js util: prepend '(node) ' to deprecation messages 2015-07-03 16:32:29 +02:00
dgram.js dgram: make send cb act as "error" event handler 2015-08-04 11:56:12 -07:00
dns.js Revert "dns: remove AI_V4MAPPED hint flag on FreeBSD" 2015-08-04 11:56:10 -07:00
domain.js deps: update v8 to 4.4.63.9 2015-08-04 11:56:14 -07:00
events.js events: deprecate static listenerCount function 2015-08-20 03:17:08 +05:30
freelist.js lib,test: add freelist deprecation and test 2015-07-17 19:48:31 -07:00
fs.js events: deprecate static listenerCount function 2015-08-20 03:17:08 +05:30
http.js util: prepend '(node) ' to deprecation messages 2015-07-03 16:32:29 +02:00
https.js https: reuse TLS sessions in Agent 2015-07-27 11:48:36 -07:00
module.js module: fix module preloading when cwd is ENOENT 2015-08-24 10:46:14 -04:00
net.js Revert "lib,src: add unix socket getsockname/getpeername" 2015-08-28 00:14:13 +02:00
os.js util: prepend '(node) ' to deprecation messages 2015-07-03 16:32:29 +02:00
path.js path: use '===' instead of '==' for comparison 2015-08-17 20:47:41 +02:00
process.js
punycode.js
querystring.js lib: don't use global Buffer 2015-06-11 20:24:44 +02:00
readline.js events: deprecate static listenerCount function 2015-08-20 03:17:08 +05:30
repl.js node: rename from io.js to node 2015-08-23 17:59:43 -04:00
smalloc.js util: prepend '(node) ' to deprecation messages 2015-07-03 16:32:29 +02:00
stream.js events: deprecate static listenerCount function 2015-08-20 03:17:08 +05:30
string_decoder.js lib: don't use global Buffer 2015-06-11 20:24:44 +02:00
sys.js
timers.js timers: minor _unrefActive fixes and improvements 2015-09-02 08:14:26 -04:00
tls.js tls: add --tls-cipher-list command line switch 2015-08-23 08:52:01 -07:00
tty.js util: prepend '(node) ' to deprecation messages 2015-07-03 16:32:29 +02:00
url.js doc: multiple documentation updates cherry picked from v0.12 2015-08-05 08:44:55 -07:00
util.js util: display constructor when inspecting objects 2015-08-08 00:13:52 -04:00
v8.js src: add total_available_size to v8 statistics 2015-08-11 22:51:50 +02:00
vm.js
zlib.js buffer: fix usage of kMaxLength 2015-08-04 11:56:12 -07:00