Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Improved dns.lookup documentation #2955

wants to merge 182 commits into from

Added some documentation about the possible errors of dns.lookup().

Not knowing that dns.lookup() would also return ENOENT when node was out of file descriptors kept me busy for quite some time.

@TooTallNate TooTallNate commented on an outdated diff
@@ -45,6 +45,11 @@ is a string representation of a IP v4 or v6 address. The `family` argument
is either the integer 4 or 6 and denotes the family of `address` (not
necessarily the value initially passed to `lookup`).
+On error, `err` is an `Error` object. Keep in mind that
+`err.errno` will be set to ENOENT not only when the domain does not exist
@TooTallNate Collaborator

I think we are considering err.code the preferred API

I'm just using the same as the existing documentation.

@bnoordhuis Owner

@TooTallNate is right, err.code is preferred. The dns docs are outdated, a lot of the error codes it mentions are wrong too.

Do you want to merge my change for now or do you want me to fix all of the DNS documentation before you accept it?

@bnoordhuis Owner

I would prefer it if you fixed all of the docs but I won't force you to.

I'll see what I can do this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@erikdubbelboer erikdubbelboer Improved DNS documentation and error codes.
- Rewrote parts of the DNS documentation.
- dns now exports all the cares error codes.

I have updated the pull request with my new changes.

I rewrote more of the DNS documentation and I added all error codes to the dns exports (some were missing).

Let me know what you think of it now.

@bnoordhuis bnoordhuis commented on an outdated diff
((31 lines not shown))
+ 'FILE',
+ 'NOMEM',
+for (var i = 0; i < codes.length; i++) {
+ exports[codes[i]] = 'E' + codes[i];
@bnoordhuis Owner

Can you turn this into a simple sequence of exports.EFOO = 'EFOO'; statements?


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Thanks, Erik. Looks good in general. If you fix the nit, I'll merge it. Can you sign the CLA?


And I have signed the CLA.

isaacs and others added some commits
@isaacs isaacs Ignore 'making a build' artifacts 8f98822
@isaacs isaacs Fix include logic was replacing https include with http 00a15e2
@TooTallNate TooTallNate build: make --openssl-use-sys a boolean option
Before you had to enter a truthy value like: --openssl-use-sys=1
@indutny indutny debugger: exit process on repl exit
* When entering repl - clone 'SIGINT' listeners array (instead of using
existing), as it will be spliced in .removeAllListeners() call later.
@indutny indutny debugger: breakOnException
Do not break automatically on exception, fixes #2926
@alFReD-NSH alFReD-NSH test: changed instances of == to === 9b55142
@bnoordhuis bnoordhuis test: fix race in simple/test-cluster-master-error
Said test checks that the workers shut down when the master errors but it failed
intermittently. Insert a small delay before doing the 'is dead?' check to give
the workers a chance to shut down.
@indutny indutny debugger: remove 'repl' command from builtinLibs
* It was displaying useless warning
@AndreasMadsen AndreasMadsen child_process: emit 'channel closed' error instead of throwing 7b57f92
@AndreasMadsen AndreasMadsen cluster: add graceful disconnect support
This patch add a worker.disconnect() method there will stop the worker from accepting
new connections and then stop the IPC. This allow the worker to die graceful.
When the IPC has been disconnected a 'disconnect' event will emit.

The patch also add a cluster.disconnect() method, this will call worker.disconnect() on
all connected workers. When the workers are disconneted it will then close all server
handlers. This allow the cluster itself to self terminate in a graceful way.
@AndreasMadsen AndreasMadsen cluster: kill workers when master dies
This patch will kill the worker once it has lost its connection with the parent.
However if the worker are doing a suicide, other measures will be used.
@isaacs isaacs Upgrade npm to 1.1.10 f3652a9
@isaacs isaacs cluster: English language fixing 5c3871b
@shigeki shigeki No need to have NativeModule.require('fs') in Module._findPath() f0dccc0
@felixge felixge Expose http parse error codes
Currently http parse errors do not expose the error details available
from http_parser. This patch exposes the error code as `err.code`.
@rlidwka rlidwka repl: fix space autocompletion bug
Tapping <SP> + <TAB> would exit the REPL.
@TooTallNate TooTallNate Revert "readline: add multiline support"
This reverts commit 443071db5749603f816199b9ec8bc512fb441d98.

Patch was overly compilicated and made some incorrect assumptions about the
position of the cursor being at the bottom of the screen. @rlidwka and I are
working on getting a proper implementation written.
ssuda process: don't use strdup()
file and cwd can be directly used from Utf8Value.
@rlidwka rlidwka readline: row-agnostic multiline readline implementation
Fixes #2959.
@evlun evlun test: fix simple/test-typed-arrays
* It incorrectly uses assert(a, b) instead of assert.equal(a, b), meaning all
  relevant assertions will pass regardless of whether they're supposed to when
  a == true.

* It makes the assumption that elements in typed arrays for numerical types
  spanning more than one byte, like Uint32Array, are stored little-endian first
  on all machines.

* It contains assorted mistakes like assert(Int32Array, typeof v4) (that one
  only passes thanks to point 1).
@evlun evlun test: merge typed arrays tests
Merge simple/test-typed-arrays-typenames into simple/test-typed-arrays.
@isaacs isaacs lint readline.js - single-quotes preferred 15da5b2
@jwueller jwueller fixed booleans being treated as strings, resulting in missing node-wa…
…f and npm
@isaacs isaacs debug: Wait 50ms before running the main module 165dc9e
@isaacs isaacs debug repl tests: Add visibility, remove test that times out
The 'Can't backtrace now' message takes over 10 seconds to return.
That's too much time to have to wait for a test, and when it times
out, it was causing an orphaned node process.

This cleans up the node process, and also removes the test that's
timing out, so that the case is hit less often.

Todo: Make the backtrace message come back faster.
@TooTallNate TooTallNate cmd: add a -i / --interactive flag to force the REPL
This is the only way to spawn a node child process in REPL mode, and will
also be needed to be able to use the REPL in MinTTY.
ssuda Avoiding unnecessary ToString() calls
String::Utf8Value and String::AsciiValue constructors take Handle<Value>
So no need to convert to Handle<String>
@shigeki shigeki tls: fix CryptoStream.setKeepAlive() 34ce448
@kapouer kapouer test: generate 1024-bit keys, pacify openssl 1.0.1 d858032
@shigeki shigeki doc: add cleartextStream.getCipher() in tls fc8bfd8
@shigeki shigeki test: add test of cleartextStream.getCipher() in tls 9df8aa8
@shigeki shigeki doc: fix TLS cipher names f5be4c2
@shigeki shigeki doc: fix default dgram multicast ttl to 1 4623c5b
@AndreasMadsen AndreasMadsen doc: fix markup in cluster docs c9b11ee
@rlidwka rlidwka readline: fix for terminals that insert newlines automatically
Fixes #2985.
@zzak zzak doc: document fs.createReadStream() encodings
Fixes #2700.
@shigeki shigeki test: add test of tls.createServer(honorCipherOrder=true) 3b8b0c6
@TooTallNate TooTallNate readline: migrate ansi/vt100 logic from tty to readline
The overall goal here is to make readline more interoperable with other node
Streams like say a net.Socket instance, in "terminal" mode.

See #2922 for all the details.
Closes #2922.
@TooTallNate TooTallNate repl: fix 'terminal' mode autodetection on global repls
Fixes test/simple/test-force-repl.js
@indutny indutny debugger: use v8 api to wait for a connection
Use v8::Debug::EnableAgent(_, _, true) to wait for incoming
debugger-client connection before emitting any break (or other) events.

This commit should fix test/simple/test-debugger-repl faults.
@TooTallNate TooTallNate repl: make ^D emit an 'end' event on the readline instance
Also emit 'exit' on the repl when 'end' is emitted on the readline.

Fixes `node debug test/fixtures/breakpoints.js` when ^D is pressed.
@TooTallNate TooTallNate repl: ensure that 'repl.useGlobal' is a boolean 72b1253
@TooTallNate TooTallNate repl: ensure that 'repl.ignoreUndefined' is a boolean 0039c22
@TooTallNate TooTallNate repl: add a 'writer' option to the repl
Previously this was a module-level setting, meaning that all REPL instances
had to share the same writer function. Turning it into one of the options
allows individual REPL instances to use their own writer function.
@indutny indutny Revert "debug: Wait 50ms before running the main module"
This reverts commit c781f17742170f2e127f9ee6652c56b406c30586.
d65f5de v8: Fix missing initialization of mark-compact flags. 203102b
@TooTallNate TooTallNate repl: add test case verifying the repl options usage a103f54
@TooTallNate TooTallNate repl: add a 'useColors' option to the repl
This should only be minimally used, since the `terminal` value will usually be
what you are expecting. This option is specifically for the case where `terminal`
is false, but you still want colors to be output (or vice-versa).
@TooTallNate TooTallNate repl: don't write a newline on the readline 'end' event
In the case of the input stream *actually* having been closed, then we
can't write to a closed socket.

Fixes test/simple/test-repl.js
@evlun evlun typed arrays: prevent unaligned typed array views on top of buffers 7ecd492
@mikeseven mikeseven typed arrays: add Uint8ClampedArray 9392918
@isaacs isaacs Upgrade npm to 1.1.14 f157559
@bnoordhuis bnoordhuis tty, readline: fix style errors 5b9438e
@bnoordhuis bnoordhuis buffer: align fast buffers on 8 byte boundary
Prevents alignment issues when people create a typed array from a buffer.
Unaligned loads or stores are less efficent and (on some architectures) unsafe.
@isaacs isaacs Reapply "debug: Wait 50ms before running the main module"
This reapplies commit c781f17742170f2e127f9ee6652c56b406c30586
This reverts commit 00224771e32e4d051e5ea33b7e854f0031359912
@isaacs isaacs Upgrade V8 to 3bbc445
@shigeki shigeki tty: add keypress event for backwards-compat b00b8d0
@isaacs isaacs Patches floating on V8 3ad6948
ssuda zlib: don't use C++ templates
Reduces the executable's size by a few kilobytes.
@shigeki shigeki tty: show deprecated warn of tty.setRawMode() 4cf0c36
@shigeki shigeki doc: change stability index of tty and readline to Unstable 5078e9d
@bnoordhuis bnoordhuis test: remove simple/test-module-load-list
Said test adds little value and only serves to annoy me when moving around
modules. It was broken anyway: it passed inside the test runner and failed
when run from the command line thanks to the environment sniffing it did.
@bnoordhuis bnoordhuis test: move simple/test-crypto-dh to pummel/
The test is too slow / CPU intensive for the main test harness.
@yosefd yosefd tls: reduce memory overhead, reuse buffer
Instead of allocating a new 64KB buffer each time when checking if there is
something to transform, continue to use the same buffer. Once the buffer is
exhausted, allocate a new buffer. This solves the problem of huge allocations
when small fragments of data are processed, but will also continue to work
well with big pieces of data.
@isaacs isaacs More logging in simple/test-eio-race
Travis-CI is failing on this test repeatedly, but other Linux systems
seem to be fine with it.  Alter the logging so it's more clear which
part is timing out.
@isaacs isaacs Upgrade V8 to 329d7e5
@TooTallNate TooTallNate tty: clarify that tty.setRawMode() has moved to process.stdin
Technically saying `tty.ReadStream#setRawMode()` is correct,
but since a typical use cannot instantiate `tty.ReadStream` themselves,
and 99% of the time the only instance is `process.stdin`,
then a little clarification seemed necessary.
@bnoordhuis bnoordhuis test: move pummel/test-tls-fragmentation to benchmark/
Said test takes over 90 seconds on my Core 2 Duo which is too long, even for
the pummel tests.
@isaacs isaacs Make rules for release blog post and email message 5d77582
@bnoordhuis bnoordhuis crypto: fix signedness compiler warnings cbef089
@bnoordhuis bnoordhuis node: fix signedness compiler warnings 887c889
@bnoordhuis bnoordhuis buffer: fix signedness compiler warnings fbf3328
@bnoordhuis bnoordhuis stream_wrap: fix signedness compiler warnings 98287d0
@bnoordhuis bnoordhuis Fix Engrish in error messages. f1c34fe
@isaacs isaacs Upgrade npm to 1.1.15 5199f56
Igor Zinkovsky upgrade libuv to ab8c3b85c1 8ec5bea
@bnoordhuis bnoordhuis node: remove unused function 7ab0b38
@bnoordhuis bnoordhuis udp: remove slab allocator d471442
@isaacs isaacs 2012.03.30, Version 0.7.7 (unstable)
* Upgrade V8 to

* Upgrade npm to 1.1.15

* Handle Emoji characters properly (Erik Corry, Bert Belder)

* readline: migrate ansi/vt100 logic from tty to readline (Nathan Rajlich)

* readline: Fix multiline handling (Alex Kocharin)

* add a -i/--interactive flag to force the REPL (Nathan Rajlich)

* debugger: add breakOnException command (Fedor Indutny)

* cluster: kill workers when master dies (Andreas Madsen)

* cluster: add graceful disconnect support (Andreas Madsen)

* child_process: Separate 'close' event from 'exit' (Charlie McConnell)

* typed arrays: add Uint8ClampedArray (Mikael Bourges-Sevenier)

* buffer: Fix byte alignment issues (Ben Noordhuis, Erik Lundin)

* tls: fix CryptoStream.setKeepAlive() (Shigeki Ohtsu)

* Expose http parse error codes (Felix Geisendörfer)

* events: don't delete the listeners array (Ben Noordhuis, Nathan Rajlich)

* process: add process.config to view node's ./configure settings (Nathan Rajlich)

* process: process.execArgv to see node's arguments (Micheil Smith)

* process: fix process.title setter (Ben Noordhuis)

* timers: handle negative or non-numeric timeout values (Ben Noordhuis)
@isaacs isaacs Now working on 0.7.8 2ad0ccc
@bnoordhuis bnoordhuis udp: root JS objects in HandleScope with Local<> dc59bf8
@bnoordhuis bnoordhuis crypto: root JS objects in HandleScope with Local<> 2c78911
@bnoordhuis bnoordhuis http: root JS objects in HandleScope with Local<> db0d247
@bnoordhuis bnoordhuis stat_watcher: root JS objects in HandleScope with Local<> 0ef9f8d
@bnoordhuis bnoordhuis tcp: root JS objects in HandleScope with Local<> 31db0a2
@bnoordhuis bnoordhuis typed arrays: root JS objects in HandleScope with Local<> e5a5eb0
@bnoordhuis bnoordhuis core: add ROUND_UP() macro 3fb7c4b
@bnoordhuis bnoordhuis core: add reusable slab allocator 8177db1
@bnoordhuis bnoordhuis stream_wrap: use new slab allocator 83d6bcd
@bnoordhuis bnoordhuis udp_wrap: use new slab allocator 08c3b9c
@bnoordhuis bnoordhuis udp_wrap: simplify AddressToJS() function 2b3d1ec
@isaacs isaacs cluster: Rename 'death' back to 'exit' cd66dcc
@isaacs isaacs Revert "tty: add keypress event for backwards-compat"
In this case, backwards compatibility is not worth the API
inconsistency.  We can just document the change.

This reverts commit b521ff3b4f8e79c5e28a1f4915d4203d8bcb0ab7.
@piscisaureus piscisaureus Revert "Re-add top-level v8::Locker"
The locker makes node crash in debug mode sometimes.
For example, test/simple/test-repl.js triggers it.

This reverts commit 9a6012edd9330296b7476bc6b7fbda2cd5c8165d.


@bnoordhuis bnoordhuis doc: fix grammar error in cluster docs 4a0c3a8
@bnoordhuis bnoordhuis Alias _snprintf to snprintf, fix Windows build. 1031d67
@bnoordhuis bnoordhuis node: don't check return value of unsetenv()
It returns void on some platforms, notably FreeBSD.
@davepacheco davepacheco build: add support for DTrace and postmortem
* fixes #2110
* includes V8 postmortem metadata in Solaris builds
* adds GYP support for DTrace probes and ustack helper
* ustack helper derives constants dynamically from libv8_base.a
* build with DTrace support by default on SunOS
@isaacs isaacs Fix #3052 Handle errors properly in zlib 9cc008f
@bnoordhuis bnoordhuis zlib: fix uninitialized variable compiler warning 3dc916d
@bnoordhuis bnoordhuis node: provide snprintf implementation on windows
_snprintf() doesn't zero-terminate the buffer on overflow.
@ry ry Fix links to libev and libeio licenses 0d9fd62
@ry ry Include text of licenses in LICENSE file
For easy inclusion in binary distributions. ref #3056
@ry ry Mac installer shows license
ref #3056
@bnoordhuis bnoordhuis build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)

Fixes #2061.
@piscisaureus piscisaureus Disable V8 postmortem debugging on Windows
It is not supported by V8.
@piscisaureus piscisaureus Windows: add build step that generates license.rtf from LICENSE 9ee91dd
@zzak zzak docs: grammar and spelling on lib/cluster.js ccad775
@piscisaureus piscisaureus Windows: installer shows license agreement dialog 89d84e1
@TooTallNate TooTallNate build: target OSX 10.5 when building on darwin 12a62b8
@nfriedly nfriedly readline: buffer data to only emit 'line' on '\n'
In "terminal: false" mode.

(And fire it multiple times if multiple lines arrive at once.)

This is necessary because the Windows telnet client sends every single
keystroke as it's typed.


Closes #3059.
@TooTallNate TooTallNate test: fix failing test-repl.js e11f749
@isaacs isaacs child_process: Emit err rather than throw for IPC write failure db799e6
@TooTallNate TooTallNate repl: make the completer use newlines
Fixes the repl.complete() function when terminal is false, since it
is now explicitly looking for a '\n' char.
@TooTallNate TooTallNate test: make repl-autolibs check that the callback was invoked 28b177c
@TooTallNate TooTallNate test: make the ArrayStream in repl tests write a '\n'
This is more correct.
Fixes them from failing with the updated readline behavior.
@TooTallNate TooTallNate readline: use StringDecoder for decoding "normal" data
The fix from #3059 was not handling multi-byte utf8 data properly.
@isaacs isaacs Revert "build: target OSX 10.5 when building on darwin"
This reverts commit b6d6a54f8057d0adad13d4bcc11eb3f443079ddc,
which fixed #3072, so we'll have to figure out another way
to make that work.
@isaacs isaacs fs.WriteStream: Handle modifications to
If the method is modified via AOP-style extension, in between
the creation of an fs.WriteStream and the processing of its action
queue, then the test of whether or not the method === will fail,
because has been replaced.

The solution is to save a reference to on the stream itself when
the action is placed in the queue.

This fixes isaacs/node-graceful-fs#6.
@TooTallNate TooTallNate Re-apply "build: target OSX 10.5 when building on darwin"
This reverts commit 93eca95aece9804d22b012cc89487f4b0064a86d.

Fixes #3072 (once again).
@TooTallNate TooTallNate build: add comment explaining MACOSX_DEPLOYMENT_TARGET. b9c161e
@isaacs isaacs Makefile: minor nit d8ddf2e
@isaacs isaacs Fix #3089 Build changelog.html for website 52e03b2
@bnoordhuis bnoordhuis deps: upgrade libuv to 3c41597 7a72ede
@bnoordhuis bnoordhuis gyp: fix 'argument list too long' build error 1fa6b6f
@TooTallNate TooTallNate configure: don't use "with" for Python 2.5 and older c2121e6
@TooTallNate TooTallNate configure: output a newline at the end of config.gypi 151432b
@piscisaureus piscisaureus Slab allocator: don't attempt to shrink a non-buffer f341654
@bnoordhuis bnoordhuis Revert "deps: upgrade libuv to 3c41597"
This reverts commit 0db4dc0024eaa538bf4913d6bf256a18126de2ba.

This commit makes a lot of tests fail due to reference counting errors. It's
not worth it to debug because the reference counting scheme is due to change
soon anyway.
@bnoordhuis bnoordhuis deps: upgrade openssl to 1.0.0f 301072f
@bnoordhuis bnoordhuis deps: reapply 0110c90 to bundled openssl f7e7e90
@bnoordhuis bnoordhuis deps: reapply 0a34755 to bundled openssl d03d312
@bnoordhuis bnoordhuis build: configure openssl
* compile with -DOPENSSL_NO_SOCK and -DOPENSSL_NO_DGRAM, we don't need it
* compile with -DOPENSSL_NO_GOST and -DOPENSSL_NO_HW_PADLOCK, works around the
  brain dead linker on solaris and maybe others
* compile with -DTERMIOS, OS X doesn't have <termio.h>
* compile with -D__EXTENSIONS__ on solaris, makes siginfo_t available
* compile without -ansi on linux, it hides a number of POSIX declarations
  (sigaction, NI_MAXHOST, etc.)
@bnoordhuis bnoordhuis test: fix openssl tests
Don't assume that the libcrypto and libssl that we're linked against is the same
version as the openssl command line tool. This is important because the tool has
a bug in all pre-1.0.0 versions that makes it unusable for these tests.
@AndreasMadsen AndreasMadsen child_process: emit error when .kill fails e468187
@bnoordhuis bnoordhuis test: merge tls-ext-key-usage into tls-securepair-client 4f28973
@piscisaureus piscisaureus Disable OpenSSL UI 0f700e8
@isaacs isaacs gyp: Apply 'argument too long' fix in another place
For some reason, aa5961a445acbd2b533ef870eb19733be7b7ede5 caused
'make test' to rebuild the entire project every time.  Applying
the fix to the other place where gyp chops up the argument list
makes it behave properly.
@bnoordhuis bnoordhuis net: honor 'enable' flag in .setNoDelay()
Fixes #3096.
@jacobsa jacobsa typed arrays: unexport SizeOfArrayElementForType()
It isn't used anywhere else, so made it an implementation detail in
@mgolawala mgolawala os: add cross platform EOL character a821fb6
@zzak zzak docs: rewrite "addons" docs to use node-gyp
Closes #3100.
Closes #3101.
@bnoordhuis bnoordhuis dns: remove unused functions c67c6e5
@isaacs isaacs Set errno in fake-failing child-process kill test 967b435
ssuda http, https: fix .setTimeout()
Fixes #3107.
@bnoordhuis bnoordhuis deps: fix -DOPENSSL_NO_SOCK on sunos
The OPENSSL_NO_SOCK macro in OpenSSL missed a couple of networking functions
that called other functions that OPENSSL_NO_SOCK *had* filtered out. None of
the functions (filtered or not) were actually used but it was enough to trip
up the Solaris linker.
@mmalecki mmalecki events: remove misleading comment cd51a15
@shama shama docs: more explicit argument names in fs 1abe04c
@zzak zzak docs: doesn't include auth
Fixes #3062.
@zzak zzak docs: url.format uses host for hostname and port, not auth
Fixes #3062.
@shigeki shigeki tcp: make getsockname() return address family as string eacba5b
@bnoordhuis bnoordhuis test: don't make request until server is listening
Preemptively fixes simple/test-https-timeout on platforms where binding to an
interface is not an instantaneous action.
@fukayatsu fukayatsu tls: remove duplicate line 81ad205
@zzak zzak docs: fix broken links in zlib docs 042b0e3
ssuda Fixing ClientRequest setTimeout EventEmitter Leak
This will fix #3068
@domenic domenic doc: note that `stream.pause` is advisory 680182b
@shama shama doc: add cache argument to fs.realpath() 25d555a
@shama shama doc: add require.extensions to globals
Closes #3028
@TooTallNate TooTallNate doc: change `in` to `input` in the readline docs
Also compacting some long lines.
@TooTallNate TooTallNate readline: re-add the Interface#close() method; rename "end" to "close"
The idea here is to reduce the number of times that `setRawMode()` is called
on the `input` stream, since it is expensive, and simply pause()/resume()
should not call it.

So now `setRawMode()` only gets called at the beginning of the Interface
instance, and then when `Interface#close()` is called.

Test case included.
@isaacs isaacs Report errors thrown from uncaughtException handers 5d4c01d
@isaacs isaacs MakeCallback: Accept Function or Symbol argument 049bdb4
@TooTallNate TooTallNate test: check for multiple "emit" calls in repl-end-emits-exit.js fde3ed6
@TooTallNate TooTallNate repl: update the `repl` for the new `readline` behavior
This fixes the failing REPL tests.
@TooTallNate TooTallNate doc: update the `readline` docs for the "close" event behavior 36dd86e
@TooTallNate TooTallNate test: lowercase setRawMode() test case filename c1af9a1
@isaacs isaacs MakeCallback: Use in 28d1067
@isaacs isaacs MakeCallback: Use in node_crypto d52cf10
@isaacs isaacs MakeCallback: Use in node_io_watcher de6437e
@isaacs isaacs MakeCallback: Return the callback return value c13fd9b
@isaacs isaacs MakeCallback: abort() if not a function 04a160d
@isaacs isaacs Domain feature
This is a squashed commit of the main work done on the domains-wip branch.

The original commit messages are preserved for posterity:

* Implicitly add EventEmitters to active domain
* Implicitly add timers to active domain
* domain: add members, remove ctor cb
* Don't hijack bound callbacks for Domain error events
* Add dispose method
* Add domain.remove(ee) method
* A test of multiple domains in process at once
* Put the active domain on the process object
* Only intercept error arg if explicitly requested
* Typo
* Don't auto-add new domains to the current domain

    While an automatic parent/child relationship is sort of neat,
    and leads to some nice error-bubbling characteristics, it also
    results in keeping a reference to every EE and timer created,
    unless domains are explicitly disposed of.

* Explicitly adding one domain to another is still fine, of course.
* Don't allow circular domain->domain memberships
* Disposing of a domain removes it from its parent
* Domain disposal turns functions into no-ops
* More documentation of domains
* More thorough dispose() semantics
* An example using domains in an HTTP server
* Don't handle errors on a disposed domain
* Need to push, even if the same domain is entered multiple times
* Array.push is too slow for the EE Ctor
* lint domain
* domain: docs
* Also call abort and destroySoon to clean up event emitters
* domain: Wrap destroy methods in a try/catch
* Attach tick callbacks to active domain
* domain: Only implicitly bind timers, not explicitly
* domain: Don't fire timers when disposed.
* domain: Simplify naming so that MakeCallback works on Timers
* Add setInterval and nextTick to domain test
* domain: Make stack private
@isaacs isaacs MakeCallback: Use in node_signal_watcher 3085863
@isaacs isaacs MakeCallback: Consistent symbol usage 7f3b500
@isaacs isaacs Domain hooks in ReqWrap<T> and MakeCallback 01f1719
@isaacs isaacs Add switches to http_simple bench to use domains 262c0ba
@isaacs isaacs Add Todo comments about domain-ifying crypto 967c5fb
@davepacheco davepacheco Fix 64-bit SmartOS build 94e7974
@isaacs isaacs test: Minor change to message/undefined_reference_in_new_context 5876610

I somehow messed up this pull request so I made a new one: #3129

Closing this one.


How does one actually use this? It seems completely undocumented; how do I have the debugger break when an exception occurs, so I can poke around? Or am I missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.