Commit Graph

9733 Commits (67dfcd55be6fb8750bc9c9d2c858ced85fe23cec)

Author SHA1 Message Date
Sam Roberts 7bd6e33318 doc: streams must be open to be passed to child
spawn stdio options can be a 'stream', but the following code
fails with "Incorrect value for stdio stream: [object Object]",
despite being a stream. The problem is the test isn't really
for a stream, its for an object with a numeric `.fd` property,
and streams do not have an fd until their async 'open' event
has occurred. This is reasonable, but was not documented.

    child_process.spawn('date', [], {stdio: [
      'ignore',
      fs.createWriteStream('out.txt',{flags:'a'}),
      'ignore']})
2014-01-13 21:36:56 +00:00
Alexis Campailla 1b74892807 test: close debug client in test-debugger-client
Killing the debuggee without first closing the socket can result
in an ECONNRESET error.
2014-01-13 13:16:25 -08:00
Alex Kocharin ec57ecc982 http: concatenate duplicate headers by default 2014-01-13 17:29:58 +00:00
Timothy J Fontaine 8753bb3859 src: return empty set on ENOSYS for interfaces
If node was compiled with --no-ifaddrs to support older operating
systems, don't throw instead simply return an empty object

Fixes #6846
2014-01-12 10:04:21 -08:00
svenpanne@chromium.org 196184d332 v8: backport codereview.chromium.org/11362182
Keep the number of descriptors below
DescriptorArray::kMaxNumberOfDescriptors even for accessors

Review URL: https://codereview.chromium.org/11362182
2014-01-10 23:32:08 +00:00
Tom Gallacher 38a07a929b util: handle escaped forward slashes correctly
Fixes #6835
2014-01-10 21:13:46 +00:00
gluxon 56913d2cde doc: Fix argument typo in SimpleProtocol example 2014-01-10 08:42:34 -08:00
Ryan Graham 5106cadffb domain: fix off-by-one in Domain.exit()
We want to clear the found domain and the domains after it.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-01-09 15:25:58 -08:00
Trevor Norris 2eddd74112 http: use writev on chunked encoding
Now will process all write() that were done on a single tick in a single
writev().
2014-01-09 15:07:14 -08:00
Jeff Barczewski 82c2084b4e test: check RR scheduler has necessary methods
The RR cluster scheduler replaces the normal StreamWrap handle. Because
of this the AsyncListener method failed to be in place when domains were
in use.

The issue was resolved in 828f145 by reverting having domains use
AsyncListeners.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-01-09 14:17:13 -08:00
Timothy J Fontaine 270c2deb84 src: OnFatalError handler must abort()
We are in an unrecoverable state if v8 throws a FatalError, actually
ask the operating system to dump core in this case.

Fixes #6836
2014-01-09 14:01:53 -08:00
Trevor Norris 646ac18d79 node: AsyncListener use separate storage mechanism
Before when an AsyncListener object was created and the "create"
callback returned a value, it was necessary to construct a new Object
with the same callbacks but add a place for the new storage value.

Now, instead, a separate storage array is kept on the context which is
used for any return value of the "create" callback. This significantly
reduces the number of Objects that need to be created.

Also added a flags property to the context to quickly check if a
specific callback was available either on the context or on the
AsyncListener instance itself.

Few other minor changes for readability that were difficult to separate
into their own commit.

This has not been optimized yet.
2014-01-09 13:47:03 -08:00
Trevor Norris 828f14556e src: revert domain using AsyncListeners
This is a slightly modified revert of bc39bdd.

Getting domains to use AsyncListeners became too much of a challenge
with many edge cases. While this is still a goal, it will have to be
deferred for now until more test coverage can be provided.
2014-01-09 13:25:20 -08:00
Fedor Indutny 0afdfae0eb configure: always set `arm_float_abi`
When not specified as a configure flag, and not derived from system
configuration, `arm_float_abi` should be set to `'default'`.

fix #6789
2014-01-09 01:08:29 +04:00
Fedor Indutny 730e511b35 child_process: better error reporting for exec
Report path to executable and argv on error, stderr is not enough in
many cases.

fix #6796
2014-01-09 00:00:30 +04:00
Fedor Indutny 4800310f6a deps: fix openssl assembly error on ia32 win32
`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .
2014-01-08 23:40:24 +04:00
Lorenz Leutgeb fc7e217a30 doc: fix typo in cluster page 2014-01-08 23:39:02 +04:00
Fedor Indutny 390598608c deps: update openssl to 1.0.1f 2014-01-08 02:43:17 +04:00
Timothy J Fontaine 30b3bc2f7c uv: Upgrade to v0.10.22 2014-01-07 14:05:58 -08:00
Ben Noordhuis f057c7049e build: unconditionally disable -Werror
Forcibly disable -Werror, the old { 'werror': '' } hack in node.gyp
no longer works with newer versions of V8.

We support a wide range of compilers, it's simply not feasible to
squelch all warnings, never mind that the libraries in deps/ are
not under our control.

Fixes #6817.
2014-01-07 23:35:04 +04:00
isaacs 1be9365930 npm: Upgrade to 1.3.23 2014-01-06 17:02:07 -08:00
ayanamist b922b5e90d stream: writes may return false but forget to emit drain
If a write is above the highWaterMark, _write still manages to
fully send it synchronously, _writableState.length will be adjusted down
to 0 synchronously with the write returning false, but 'drain' will
not be emitted until process.nextTick.

If another small write which is below highWaterMark is issued before
process.nextTick happens, _writableState.needDrain will be reset to false,
and the drain event will never be fired.

So we should check needDrain before setting it up, which prevents it
from inproperly resetting to false.
2014-01-05 19:44:45 +04:00
Lorenz Leutgeb e1f4f6aa28 doc: Add forward secrecy section to TLS docs
This fixes confusion connected to comparison of ECDH
with RSA and wrong information on forward secrecy.
2014-01-05 17:15:08 +04:00
Fedor Indutny 92b6417098 crypto: introduce .setEngine(engine, [flags]) 2014-01-05 16:42:33 +04:00
Trevor Norris a40b463674 node: properly check uid when adding AsyncListener
Instead of checking the uid on the array index of the queue, instead the
object property "uid" was checked on the queue iteself. Because this
will always evaluate to "undefined" the same listener could be added
multiple times to the same context.
2014-01-03 16:48:11 -08:00
Trevor Norris d9fc6af32a node: change AsyncListener API
There was a flaw in the old API that has been fixed. Now the
asyncListener callback is now the "create" object property in the
callback object, and is optional.
2014-01-03 13:20:23 -08:00
Timothy J Fontaine 13eb17f412 Merge remote-tracking branch 'upstream/v0.10' 2013-12-31 16:28:49 -08:00
Timothy J Fontaine aa56d9d354 blog: Post for v0.11.10 2013-12-31 16:24:58 -08:00
Timothy J Fontaine c3e26d64f8 Now working on 0.11.11 2013-12-31 16:21:08 -08:00
Timothy J Fontaine c039bc3a0e Merge branch 'v0.11.10-release' 2013-12-31 16:20:58 -08:00
Timothy J Fontaine 66931791f0 2013.12.31, Version 0.11.10 (Unstable)
* http_parser: update to 2.2

* uv: Upgrade to v0.11.17

* v8: Upgrade to 3.22.24.10

* buffer: optimize writeInt* methods (Paul Loyd)

* child_process: better error handling (Alexis Campailla)

* cluster: do not synchronously emit 'setup' event (Sam Roberts)

* cluster: restore backwards compatibility and various fixes (Sam Roberts)

* crypto: remove unnecessary OpenSSL_add_all_digests (Yorkie)

* crypto: support GCM authenticated encryption mode. (Ingmar Runge)

* dns: add resolveSoa and 'SOA' rrtype (Tuğrul Topuz)

* events: move EE c'tor guts to EventEmitter.init (Bert Belder)

* http: DELETE shouldn't default to chunked encoding (Lalit Kapoor)

* http: parse the status message in a http response. (Cam Swords)

* node: fix removing AsyncListener in callback (Vladimir Kurchatkin)

* node: follow specification, zero-fill ArrayBuffers (Trevor Norris)

* openssl: use ASM optimized routines (Fedor Indutny)

* process: allow nextTick infinite recursion (Trevor Norris)

* querystring: remove `name` from `stringify()` (Yorkie)

* timers: setImmediate v8 optimization fix (pflannery)

* tls: add serialNumber to getPeerCertificate() (Ben Noordhuis)

* tls: reintroduce socket.encrypted (Fedor Indutny)

* tls: fix handling of asterisk in SNI context (Fedor Indutny)

* util: Format negative zero as '-0' (David Chan)

* vm: fix race condition in timeout (Alexis Campailla)

* windows: fix dns lookup of localhost with ipv6 (Alexis Campailla)
2013-12-31 15:37:12 -08:00
Timothy J Fontaine 5ce4f3ec3d v8: Upgrade to 3.22.24.10 2013-12-31 15:02:38 -08:00
Timothy J Fontaine 08c83bb172 Merge remote-tracking branch 'upstream/v0.10' 2013-12-31 14:57:46 -08:00
Maciej Małecki 5a8de857f0 doc: document that `process.send` is synchronous
Ref #2598
2013-12-31 14:52:43 -08:00
Timothy J Fontaine ffb718b5a3 doc: clarify process on exit safe usage 2013-12-31 14:48:20 -08:00
Ron Korving 3917232030 docs: process.on('exit') receives exit code
The fact that the "exit" event passes the exit code as an argument
as omitted from the documentation. This adds the explanation and
augments the example code to show that.
2013-12-31 14:38:09 -08:00
Tuğrul Topuz bddea032b7 dns: add resolveSoa and 'SOA' rrtype
You can now query for SOA records by either passing 'SOA' to `resolve`
or by using the new `resolveSoa`
2013-12-31 14:30:40 -08:00
Timothy J Fontaine 13de0f1d27 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	lib/cluster.js
	lib/dgram.js
	lib/net.js
2013-12-31 13:56:15 -08:00
Timothy J Fontaine 6f8aa24d1e test: fix test-cluster-eaccess to work on windows 2013-12-31 11:57:13 -08:00
Sam Roberts cb1646f44e test: fix assumption of worker exit on disconnect
Master was disconnecting its workers as soon as they both started up.
Meanwhile, the workers were trying to listen. Its a race, sometimes the
disconnect would happen between when worker gets the response message,
and acks that message with a 'listening'. This worked OK after v0.11
introduced a behaviour where disconnect would always exit the worker,
but once that backwards-incompatible behaviour is removed, the worker
lives long enough to try and respond to the master, and child_process
errors at the attempt to send from a disconnected child.
2013-12-31 11:43:44 -08:00
Sam Roberts 876d3bd85a cluster: do not synchronously emit 'setup' event
This is a problem present in both v0.10, and v0.11, where the 'setup'
event is synchronously emitted by `cluster.setupMaster()`, a mostly
harmless anti-pattern.
2013-12-31 11:43:44 -08:00
Sam Roberts dce35146e0 cluster: only forcibly exit worker on unclean exit
Fix inadvertent v0.11 changes to the definition of suicide, particularly
the relationship between suicide state, the disconnect event, and when
exit should occur.

In v0.10, workers don't forcibly exit on disconnect, it doesn't give
them time to do a graceful finish of open client connections, they exit
under normal node rules - when there is nothing left to do. But on
unexpected disconnect they do exit so the workers aren't left around
after the master.

Note that a test as-written was invalid, it failed against the v0.10
cluster API, demonstrating that it was an undocumented API change.
2013-12-31 11:43:43 -08:00
Sam Roberts 6f40abe2d4 cluster: disconnect callback should always occur
Fixes issue in 0.11 where callback doesn't occur if worker count is
currently zero.  In 0.10 callback occurs after worker count is zero, and
occurs in next tick if worker count is currently zero.
2013-12-31 11:43:43 -08:00
Sam Roberts 3c649703c7 cluster: replace erroneous comma with semicolon 2013-12-31 11:43:43 -08:00
Timothy J Fontaine 8590f810a5 uv: Upgrade to v0.11.17 2013-12-31 10:33:54 -08:00
Fedor Indutny 3e9f2e61db cluster: report more errors to workers
Some errors for listening and binding to a socket were not properly
delivered to workers.

fix #6767
2013-12-31 09:47:33 -08:00
Benjamin Waters 58d6ca3a95 doc: Fix doc heading for 'response' event
Add colon to event heading to ensure it matches other events.

Fixes joyent/node#5687
2013-12-31 13:46:38 +04:00
Timothy J Fontaine 3dcb71f962 Merge remote-tracking branch 'upstream/v0.10' 2013-12-30 15:55:47 -08:00
Fedor Indutny cb5da7b443 deps: update gyp to 828ce09 2013-12-30 15:52:47 -08:00
pflannery 7ced966a32 timers: setImmediate v8 optimization fix
Prevent v8 disabling optimization for scenario "bad value context for
arguments value".

Solves #6631

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2013-12-30 14:58:38 -08:00