0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

10045 Commits

Author SHA1 Message Date
Ryan Graham
04d6fc2c3f cluster: include settings object in 'setup' event
Emits on every call to cluster.setupMaster(), even if no new settings
are given. This is because calling cluster.setupMaster() without
arguments (or with an empty options object) results in the settings
being restored to their defaults.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-15 00:12:43 +04:00
Ryan Graham
b96e38ac3a cluster: allow multiple calls to setupMaster()
Only attributes of 'cluster.settings' will be modified after the first
call, leaving all other cluster initialization alone. Each call that
includes a 'settings' argument triggers a 'setup' event to be emitted.

Instead of each call resetting all values to their defaults, use the
current settings (if any) as the default. This retains setupMaster's
support how cluster.fork() uses setupMaster() to ensure
cluster.settings has been populated.

Update example in docs to use current node coding style and include
an example of progressive configuration.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-15 00:12:43 +04:00
Fedor Indutny
b692493766 test: fix regress-GH-1726 2014-07-13 23:15:52 +04:00
Dean McNamee
da30c0084a src: pass the v8::Context to CreateEnvironment
Pass in the v8::Context, instead of creating it
within CreateEnvironment.  This allows callers
to use a pre-existing context.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-13 23:07:46 +04:00
cjihrig
c4e5fde362 child_process: copy spawnSync() cwd option to proper buffer
The spawnSync() cwd option was being copied to the incorrect
location. This commit copies to the correct location.

Closes #7824

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-12 12:46:16 +03:00
Ryan Graham
9452ea2ef5 doc: re-org child_process into async/sync
Cleaner separation between the traditional non-blocking functions and
the new blocking variants.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:20:33 +03:00
Ryan Graham
a7b14f7a89 test: Remove references to customFds
Option has been deprecated since v0.5.11

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:07:08 +03:00
Ryan Graham
feac62d8d6 doc: remove customFds mentions
The feature has been marked as deprecated since v0.5.11.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:07:07 +03:00
Ryan Graham
245469587c lib: noisy deprecation of child_process customFds
Use a util.deprecate wrapper to issue warnings like any other
deprecated API. The option has been marked as deprecated in the docs
since v0.5.11.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:07:07 +03:00
Andrew Oppenlander
e1fec22f97 streams: set default hwm properly for Duplex
Default highWaterMark is now set properly when using stream Duplex's
writableObjectMode and readableObjectMode options.

Added condition to the already existing split objectMode test to ensure
the highWaterMark is being set to the correct default value on both the
ReadableState and WritableState for readableObjectMode and
writableObjectMode.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 13:28:55 +03:00
Fedor Indutny
832d4db5f2 contextify: remove useless header file
fix #7910
2014-07-08 21:43:48 +03:00
John Albietz
fc6eae8da2 readme: added g++ requirement
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-07 14:19:23 +03:00
Robert Kowalski
46ccb201cb module: don't require fs several times
As we are going to need fs in any case, just require it at the
beginning of the file.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-07 13:40:22 +03:00
Ed Umansky
df205360f5 net: reset errorEmitted on reconnect
Fix for `error` events emitting only once when reconnecting
a single instance of net.Socket.

Fixes joyent/node#7888

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-03 15:06:33 +04:00
Trevor Norris
803c3f0aa0 lint: fix indentation 2014-07-02 21:02:36 -07:00
Andrius Bentkus
a382c9a97c udp: make it possible to receive empty udp packets
A udp packet can have 0 content. In that case nread will be equal to 0,
but addr != NULL.

Add test case for empty data gram packets and fixed test that checked
for OOB when length == 0.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-07-02 20:59:27 -07:00
Fedor Indutny
20247064b6 deps: cherry-pick eca441b2 from OpenSSL
Original commit message:

    bn_exp.c: fix x86_64-specific crash with one-word modulus.

    PR: #3397

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-03 00:45:00 +04:00
Fedor Indutny
e345253562 tls: better error reporting at cert validation
fix #7417

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-03 00:41:39 +04:00
Fedor Indutny
ae1e325e8a child_process: accept uid/gid everywhere
Accept uid/gid option in every execute/spawn call (including
cluster.fork). Add documentation where needed.

fix #7881

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-07-02 13:01:07 -07:00
Eli Skeggs
1100f3de7a net: don't emit listening if handle is closed
Fixes #7834

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-07-02 12:35:06 -07:00
Yazhong Liu
613654e882 test: fix multiple_line problem in match
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-01 19:04:35 +04:00
Ionică Bizău
02b8109c14 docs: highlight shell-codes in CONTRIBUTING.md
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-01 16:28:50 +04:00
Refael Ackermann
423725b34d configure: better detect windows 'bitness' (WOW64)
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-01 15:48:42 +04:00
Arnout Kazemier
1c0ec71725 events: Output the event that is leaking
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-01 15:45:55 +04:00
Fedor Indutny
b5175003bc repl: fix multi-line input
The refactor in 3ae0b17c broke the multiline input's visual appearence.
While actually switching to this mode, the `...` prefix is not
displayed.

Additionally, account only SyntaxErrors that are happening at the parse
time, everything else should not be switching repl to the multiline
mode.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-30 13:04:36 +04:00
Jonathan Reem
7fa4a9697d stream: only end reading on null, not undefined
The [Stream documentation for .push](http://nodejs.org/api/stream.html#stream_readable_push_chunk_encoding)
explicitly states multiple times that null is a special cased value
that indicates the end of a stream. It is confusing and undocumented
that undefined *also* ends the stream, even though in object mode
there is a distinct and important difference.

The docs for Object-Mode also explicitly mention null as the *only*
special cased value, making no mention of undefined.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-30 12:45:54 +04:00
Fedor Indutny
73343d5cee http: remove unused code block
fix #7769

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-27 17:00:10 +04:00
Yazhong Liu
6b09f9cd41 node: fix #7841 by overlooking the spare sourceline
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-27 16:09:52 +04:00
cjihrig
2cae44f169 buffer: construct new buffer from buffer toJSON() output
Creating a new buffer from the toJSON() output of another
buffer does not currently work. This commit adds that
support. Closes #7849.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-27 13:36:44 +04:00
Fedor Indutny
1a1b1a7534
deps: update libuv to v0.11.26 2014-06-27 04:44:36 +04:00
Saúl Ibarra Corretgé
35b9580cd8
dns: introduce lookupService function
Uses getnameinfo to resolve an address an port into a hostname and
service.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-27 04:02:19 +04:00
Fedor Indutny
922afd9164
deps: build v8 with disassembler support
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-25 14:50:00 +04:00
Fedor Indutny
c147e81091
crypto: add honorCipherOrder argument
Add `honorCipherOrder` argument to `crypto.createCredentials`.

fix #7249
2014-06-25 14:47:59 +04:00
Fedor Indutny
e50749bb05
doc: document tls.createSecureContext 2014-06-25 14:11:09 +04:00
Fedor Indutny
56d767fd69
test: fix tls-client-default-ciphers
The test execution should not depend on the servers running locally.

fix #7832
2014-06-25 11:17:59 +04:00
Chris Dickinson
61baefce1e dns: send lookup c-ares errors to callback
Calling dns.lookup with arguments that generate an error from c-ares
previously sent those errors back to the callback. This commit restores
the ca9eb71 behavior.

Fixes #7731.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 17:08:57 -07:00
Fred K. Schott
a55c60c715 module: document important methods
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 20:26:02 +04:00
Kyle Robinson Young
16ed194659 doc: typos in child_process
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 20:25:26 +04:00
Jan Krems
ad5e8ec3e2 doc: process: Document process.mainModule
Instrumentation code might need to find out the entry point of the
process in a global context.
Documenting the existing process.mainModule to officially support this.

Fixes #7808

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 20:21:25 +04:00
Yazhong Liu
fcbffa71d0 tls: using %StringSplit to split cert.subjectaltname
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 09:55:26 +04:00
Charles
be8114e5c5 child_process: don't throw on EAGAIN
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 08:45:29 +04:00
Ed Morley
c08da463ad child_process: use full path for cmd.exe on Win32
Currently child_process.exec() assumes that cmd.exe is on the PATH,
and fails with a spawn ENOENT error if it is not.

The Windows 'comspec' environment variable contains the full filepath
to the default command interpreter, eg "C:\Windows\System32\cmd.exe".
Should it not be set, we fall-back to using 'cmd.exe' from PATH, as
before.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 08:44:11 +04:00
Timothy J Fontaine
4f1782ef75 Merge remote-tracking branch 'upstream-rw/v0.10' 2014-06-16 19:20:45 -05:00
Timothy J Fontaine
e22ea56647 node: update changelog to have proper npm version
fixes #7793
2014-06-16 19:16:13 -05:00
Timothy J Fontaine
361aa5344d build: run wix tool chain out of process
Building MSIs for different arch's can sometimes confuse MSBuild and
Wix, isntead run the toolchain externally so we don't have to worry
about which arch cmd.exe is running as.
2014-06-13 14:39:53 -07:00
Fedor Indutny
c047127410 contextify: throw timeout error properly
fix #7509
2014-06-12 18:30:41 -07:00
Fedor Indutny
d5198768de watchdog: terminate one specific isolate 2014-06-12 18:30:26 -07:00
Ben Noordhuis
d78a3787d2 deps: cherry-pick r21466 from v8 trunk
Check for cached transition to ExternalArray elements kind.
See [1] and [2] for details.

[1] https://code.google.com/p/v8/issues/detail?id=3337
[2] https://codereview.chromium.org/291193011

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-12 17:46:18 -07:00
Ben Noordhuis
5d178188a7 deps: cherry-pick r21297 from v8 trunk
Changes the return value of PropertyCallbackInfo<T>::This() from
Local<Value> back to Local<Object>.  See [1] and [2] for background.

[1] https://groups.google.com/forum/#!topic/v8-users/wP2UcQ4cBW4
[2] https://codereview.chromium.org/285643008/

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-12 17:46:18 -07:00
Ben Noordhuis
dde590d8b9 deps: fix up v8 postmortem codegen
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-12 17:46:18 -07:00