Eugene Girshov [Mon, 4 Mar 2013 20:44:56 +0000 (22:44 +0200)]
http: fix multiple timeout events
Fixed up slightly by @isaacs so as not to miss 'timeout' events in some
cases.
Ben Noordhuis [Wed, 6 Mar 2013 15:15:17 +0000 (16:15 +0100)]
net: use close callback, not process.nextTick
Don't emit the 'close' event with process.nextTick.
Closing a handle is an operation that usually *but not always* completes
on the next tick of the event loop, hence using process.nextTick is not
reliable.
Use a proper handle close callback and emit the 'close' event from
inside the callback.
Update tests that depend on the intricacies of the old model.
Fixes #3459.
Ben Noordhuis [Wed, 6 Mar 2013 14:32:40 +0000 (15:32 +0100)]
handle_wrap: add close callback support
Ben Noordhuis [Wed, 6 Mar 2013 14:24:20 +0000 (15:24 +0100)]
handle_wrap: replace unref_ field with flags_ field
Prep work for a follow-up commit that adds support for close callbacks.
Ben Noordhuis [Wed, 6 Mar 2013 13:45:47 +0000 (14:45 +0100)]
src: remove unused symbols in node_file.cc
Pavel Lang [Tue, 18 Sep 2012 09:21:38 +0000 (11:21 +0200)]
DNS: Support NAPTR queries
They were previously removed in
a90bc78534d94940a6b726c01cf8427c296b4c63.
isaacs [Wed, 6 Mar 2013 09:07:46 +0000 (01:07 -0800)]
cares: Set process._errno, not global.errno
This makes test-internet pass
Scott Blomquist [Sat, 16 Feb 2013 01:25:57 +0000 (17:25 -0800)]
child_process: handle ENOENT correctly on Windows
Timothy J Fontaine [Tue, 5 Mar 2013 19:05:50 +0000 (11:05 -0800)]
build: define nightly tag external to build system
isaacs [Mon, 4 Mar 2013 03:43:46 +0000 (19:43 -0800)]
stream: Use class for write buffer entries
isaacs [Mon, 4 Mar 2013 03:14:06 +0000 (19:14 -0800)]
stream: _write takes an encoding argument
This vastly reduces the overhead of decodeStrings:false streams,
such as net and http.
isaacs [Mon, 4 Mar 2013 03:05:44 +0000 (19:05 -0800)]
stream: Remove output function from _transform
Just use stream.push(outputChunk) instead.
isaacs [Mon, 4 Mar 2013 00:12:02 +0000 (16:12 -0800)]
stream: Split Writable logic into small functions
1. Get rid of unnecessary 'finishing' flag
2. Dont check both ending and ended. Extraneous.
Also: Remove extraneous 'finishing' flag, and don't check both 'ending'
and 'ended', since checking just 'ending' is sufficient.
isaacs [Sun, 3 Mar 2013 23:44:36 +0000 (15:44 -0800)]
bench: Add flag to be silent in runner
This is helpful in tracking down bailouts and deopts in Stream classes,
without triggering one from the string write in console.log
Nathan Rajlich [Tue, 5 Mar 2013 20:17:48 +0000 (12:17 -0800)]
process: invoke EventEmitter on `process`
This properly sets the `_maxListeners` property, which
fixes the max listener warning. Closes #4924.
Bert Belder [Tue, 5 Mar 2013 18:38:28 +0000 (19:38 +0100)]
Revert "build, windows: disable SEH"
This is no longer necessary - the underlying issue was fixed in 01fa5ee.
This reverts commit
d87904286024f5ceb6a2d0d5f17e919c775830a0.
Bert Belder [Tue, 5 Mar 2013 18:36:29 +0000 (19:36 +0100)]
win/openssl: mark assembled object files as seh safe
There are no unsafe structured exception handlers in object files
generated from hand-crafted assembly - because they contain no exception
handlers at all.
Paolo Fragomeni [Mon, 4 Mar 2013 21:04:55 +0000 (16:04 -0500)]
Update domain.markdown
Ben Noordhuis [Tue, 5 Mar 2013 15:10:13 +0000 (16:10 +0100)]
deps: upgrade libuv to 0b26af3
Ben Noordhuis [Tue, 5 Mar 2013 14:43:03 +0000 (15:43 +0100)]
Merge remote-tracking branch 'origin/v0.8'
Ben Noordhuis [Thu, 9 Feb 2012 05:22:50 +0000 (06:22 +0100)]
cluster: propagate bind errors
This commit fixes a bug where the cluster module fails to propagate
EADDRINUSE errors.
When a worker starts a (net, http) server, it requests the listen socket
from its master who then creates and binds the socket.
Now, OS X and Windows don't always signal EADDRINUSE from bind() but
instead defer the error until a later syscall. libuv mimics this
behaviour to provide consistent behaviour across platforms but that
means the worker could end up with a socket that is not actually bound
to the requested addresss.
That's why the worker now checks if the socket is bound, raising
EADDRINUSE if that's not the case.
Fixes #2721.
Felix Böhm [Tue, 5 Mar 2013 08:20:23 +0000 (09:20 +0100)]
events: loop backwards in removeListener
`removeAllListeners` is removing events from end to start. Therefore
it spends O(n^2) time, since `removeListener` is searching from start to
end.
Trevor Norris [Mon, 4 Mar 2013 19:59:55 +0000 (11:59 -0800)]
events: code consistency
v8 likes when smaller functions have a single return point, and cleaned
up the single non-strict check.
Trevor Norris [Mon, 4 Mar 2013 19:33:03 +0000 (11:33 -0800)]
events: remove type check for event type
Strict checking for typeof types broke backwards compatibility for other
libraries. This reverts those checks.
The subclass test has been changed to ensure all operations can be
performed on the inherited EE before instantiation. Including the
ability to set event names with numbers.
Ben Noordhuis [Mon, 4 Mar 2013 19:54:34 +0000 (20:54 +0100)]
doc: add url.resolve() usage examples
Fixes #4913.
Bert Belder [Mon, 4 Mar 2013 18:47:05 +0000 (19:47 +0100)]
win/msi: make msi build work when spaces are present in the path
isaacs [Sun, 3 Mar 2013 00:03:22 +0000 (16:03 -0800)]
stream: Don't require read(0) to emit 'readable' event
When a readable listener is added, call read(0) so that data will flow in, up to
the high water mark.
Otherwise, it's somewhat confusing that you have to listen for readable,
and ALSO call read() (when it will certainly return null) just to get some
data out of the stream.
See: #4720
Xidorn Quan [Sun, 3 Mar 2013 04:53:51 +0000 (12:53 +0800)]
dns: fix ReferenceError in resolve() error path
A typo in the variable name makes it throw a ReferenceError instead of
the expected "Unknown type" error when dns.resolve() is passed a bad
record type argument.
Fixes the following exception:
ReferenceError: type is not defined
at Object.exports.resolve (dns.js:189:40)
at /Users/bnoordhuis/src/master/test/simple/test-c-ares.js:48:9
<snip>
Rod Vagg [Mon, 4 Mar 2013 02:03:40 +0000 (13:03 +1100)]
link to LevelUP modules wiki page, not level-hooks
Rod Vagg [Mon, 4 Mar 2013 02:03:40 +0000 (13:03 +1100)]
link to LevelUP modules wiki page, not level-hooks
isaacs [Sun, 3 Mar 2013 23:22:12 +0000 (15:22 -0800)]
cluster: Rename destroy() to kill(signal=SIGTERM)
Fix #4133, bringing the cluster worker API more in line with the
child process API.
isaacs [Sat, 2 Mar 2013 20:25:16 +0000 (12:25 -0800)]
stream: Writable.end(chunk) after end is an error
Calling end(data) calls write(data). Doing this after end should
raise a 'write after end' error.
However, because end() calls were previously ignored on already
ended streams, this error was confusingly suppressed, even though the
data never is written, and cannot get to the other side.
This is a re-hash of
5222d19a11ed0e29d207da0e8c9c8e0e3b18ad78, but
without assuming that the data passed to end() is valid, and thus
breaking a bunch of tests.
Aaron Cannon [Sun, 3 Mar 2013 21:11:08 +0000 (15:11 -0600)]
doc: Add crypto.pseudoRandomBytes, fix typo
Dave Olszewski [Sat, 19 Jan 2013 00:25:52 +0000 (16:25 -0800)]
make repl compatible with domains
The try/catch in repl.js keeps any active domain from catching the
error. Since the domain may not even be enterd until the code is run,
it's not possible to avoid the try/catch, so emit on the domain when an
error is thrown.
Ben Noordhuis [Sun, 3 Mar 2013 01:21:28 +0000 (02:21 +0100)]
Revert "stream: Writable.end(chunk) after end is an error"
It's breaking ~22 tests, Needs further investigation.
This reverts commit
5222d19a11ed0e29d207da0e8c9c8e0e3b18ad78.
isaacs [Sun, 3 Mar 2013 00:10:21 +0000 (16:10 -0800)]
doc: Typo in ChangeLog
downgrade TO 3.14
isaacs [Sat, 2 Mar 2013 20:25:16 +0000 (12:25 -0800)]
stream: Writable.end(chunk) after end is an error
Calling end(data) calls write(data). Doing this after end should
raise a 'write after end' error.
However, because end() calls were previously ignored on already
ended streams, this error was confusingly suppressed, even though the
data never is written, and cannot get to the other side.
isaacs [Sat, 2 Mar 2013 23:11:23 +0000 (15:11 -0800)]
events: Handle emit('error') before ctor
The previous commit did not handle the case when the event type
is 'error', since that is checked before reading the handler.
isaacs [Sat, 2 Mar 2013 19:58:21 +0000 (11:58 -0800)]
events: Handle emit before constructor call
Ben Noordhuis [Sat, 2 Mar 2013 22:13:35 +0000 (23:13 +0100)]
Merge remote-tracking branch 'origin/v0.8'
Conflicts:
doc/api/http.markdown
test/simple/test-crypto.js
Ben Noordhuis [Sat, 2 Mar 2013 22:04:05 +0000 (23:04 +0100)]
test: make simple/test-dgram-pingpong respect PORT
Don't use hard-coded port numbers, use common.PORT instead.
Should fix the occasional Jenkins failure; the builds run in parallel.
isaacs [Sat, 2 Mar 2013 19:50:33 +0000 (11:50 -0800)]
net: s/closed/ended/ in write-after-fin message
isaacs [Sat, 2 Mar 2013 18:20:33 +0000 (10:20 -0800)]
net: Provide better error when writing after FIN
The stock writable stream "write after end" message is overly vague, if
you have clearly not called end() yourself yet.
When we receive a FIN from the other side, and call destroySoon() as a
result, then generate an EPIPE error (which is what would happen if you
did actually write to the socket), with a message explaining what
actually happened.
Raymond Feng [Sat, 2 Mar 2013 18:08:08 +0000 (10:08 -0800)]
windows/msi: fix msi build issue with WiX 3.7/3.8
The `heat` tool that gathers NPM source files wasn't getting called.
Closes #4896
Timothy J Fontaine [Tue, 26 Feb 2013 06:19:16 +0000 (22:19 -0800)]
test: optionally set common.PORT via env variable
This is a back-port of commit 17a8126 from the master branch.
Ben Noordhuis [Sat, 2 Mar 2013 01:43:01 +0000 (02:43 +0100)]
test: unlink temp file at test start
The file has a long name that's apparently impossible to remove with
`git clean` on Windows.
Trevor Norris [Wed, 27 Feb 2013 08:15:28 +0000 (00:15 -0800)]
events: add type checks to once
Also cleanup unnecessary use of "self" since it will always be called
using .apply() from emit.
Trevor Norris [Tue, 26 Feb 2013 19:20:19 +0000 (11:20 -0800)]
events: emit cleanup
Cleanup check logic. Place vars at top. Remove PROCESS.
Trevor Norris [Tue, 26 Feb 2013 18:20:44 +0000 (10:20 -0800)]
events: additional type check for addListener
Check both passed args to addListener.
Place var at beginning.
Trevor Norris [Tue, 26 Feb 2013 17:47:36 +0000 (09:47 -0800)]
events: _events to object and undefined not null
By making sure the _events is always an object there is one less check
that needs to be performed by emit.
Use undefined instead of null. typeof checks are a lot faster than
isArray.
There are a few places where the this._events check cannot be removed
because it is possible for the user to call those methods after using
utils.extend to create their own EventEmitter, but before it has
actually been instantiated.
Trevor Norris [Thu, 21 Feb 2013 07:54:38 +0000 (23:54 -0800)]
events: removeListener add checks and cleanup
Remove unecessary splice for single listener events. Add type check for
"type" argument.
Trevor Norris [Wed, 20 Feb 2013 23:33:24 +0000 (15:33 -0800)]
events: type check listeners
Make sure the argument passed is a string. Also use typeof === function
check instead of isArray().
Trevor Norris [Wed, 20 Feb 2013 23:19:05 +0000 (15:19 -0800)]
events: simplify removeAllListeners logic
Unnecessary checks were being performed on if the event existed before
being removed.
_events starts out as null, so reset to null when emptied.
Checking typeof is a lot cheaper than isArray().
Trevor Norris [Wed, 20 Feb 2013 23:04:58 +0000 (15:04 -0800)]
events: type check setMaxListeners, cleanup throws
setMaxListeners will now make sure a positive number is passed. Also
throwing more definitive Error types.
Trevor Norris [Wed, 20 Feb 2013 22:52:46 +0000 (14:52 -0800)]
events: ensure usingDomain is always boolean
Small addition to ensure that exports.usingDomains is always a bool.
Trevor Norris [Thu, 14 Feb 2013 08:48:11 +0000 (00:48 -0800)]
events: add check for listeners length
Ability to return just the length of listeners for a given type, using
EventEmitter.listenerCount(emitter, event). This will be a lot cheaper
than creating a copy of the listeners array just to check its length.
Ben Noordhuis [Sat, 2 Mar 2013 01:09:14 +0000 (02:09 +0100)]
crypto: don't assert when calling Cipher#final() twice
Remove the assert() that triggered when Cipher#final() or
Decipher#final() was called twice.
Fixes #4886.
Ben Noordhuis [Sat, 2 Mar 2013 00:49:19 +0000 (01:49 +0100)]
deps: upgrade libuv to 7e59f9b
Lars-Magnus Skog [Fri, 1 Mar 2013 20:09:36 +0000 (21:09 +0100)]
doc change for Readable._read()
isaacs [Fri, 1 Mar 2013 22:26:35 +0000 (14:26 -0800)]
doc: Clarify advisory-ness of stream._read() argument
Gil Pedersen [Fri, 1 Mar 2013 22:15:28 +0000 (23:15 +0100)]
doc: Update to reflect new _read() interface
Evan Oxfeld [Fri, 1 Mar 2013 20:10:36 +0000 (15:10 -0500)]
doc: Fix readable.unshift() example
Slice the portion of the buffer to unshift back into the read queue
Scott Blomquist [Fri, 1 Mar 2013 20:03:44 +0000 (12:03 -0800)]
build/windows: don't use wrong version number
We were using a global temp file while setting the NODE_VERSION
environment variable. This resulted in simultaneous builds swapping
version numbers on occasion.
This patch removes the use of a temp file for this.
isaacs [Fri, 1 Mar 2013 19:22:07 +0000 (11:22 -0800)]
blog: Post about v0.9.11
isaacs [Fri, 1 Mar 2013 19:23:55 +0000 (11:23 -0800)]
doc: Correct version in changelog
isaacs [Fri, 1 Mar 2013 19:19:38 +0000 (11:19 -0800)]
Now working on 0.9.12
isaacs [Fri, 1 Mar 2013 19:19:20 +0000 (11:19 -0800)]
Merge branch 'v0.9.11-release'
isaacs [Fri, 1 Mar 2013 17:58:35 +0000 (09:58 -0800)]
2013.03.01, Version 0.9.10 (Unstable)
* V8: downgrade 3.14.5
* openssl: update to 1.0.1e
* darwin: Make process.title work properly (Ben Noordhuis)
* fs: Support mode/flag options to read/append/writeFile (isaacs)
* stream: _read() no longer takes a callback (isaacs)
* stream: Add stream.unshift(chunk) (isaacs)
* stream: remove lowWaterMark feature (isaacs)
* net: omit superfluous 'connect' event (Ben Noordhuis)
* build, windows: disable SEH (Ben Noordhuis)
* core: remove errno global (Ben Noordhuis)
* core: Remove the nextTick for running the main file (isaacs)
* core: Mark exit() calls with status codes (isaacs)
* core: Fix debug signal handler race condition lock (isaacs)
* crypto: clear error stack (Ben Noordhuis)
* test: optionally set common.PORT via env variable (Timothy J Fontaine)
* path: Throw TypeError on non-string args to path.resolve/join (isaacs, Arianit Uka)
* crypto: fix uninitialized memory access in openssl (Ben Noordhuis)
isaacs [Fri, 1 Mar 2013 18:21:21 +0000 (10:21 -0800)]
blog: Do not pass undefined to path.join
isaacs [Fri, 1 Mar 2013 17:10:26 +0000 (09:10 -0800)]
fs: Support mode/flag options to read/append/writeFile
Fix #4841
isaacs [Fri, 1 Mar 2013 16:54:49 +0000 (08:54 -0800)]
test: Put fs write test files in tmp
This prevents fixture litter when these tests fail.
Ben Noordhuis [Fri, 1 Mar 2013 12:01:53 +0000 (13:01 +0100)]
http: use socket.once, not socket.on
Register the 'close' event listener with .once(), not .on().
It doesn't matter in the grand scheme of things because the listener
doesn't keep references to any heavy-weight objects but using .once()
for a oneshot listener is something of a best practice.
Timothy J Fontaine [Fri, 1 Mar 2013 00:56:37 +0000 (16:56 -0800)]
build: windows should append date if nightly
isaacs [Thu, 28 Feb 2013 23:42:55 +0000 (15:42 -0800)]
doc: Provide 2 examples of SimpleProtocol parser
The first example uses Readable, and shows the use of
readable.unshift(). The second uses the Transform class, showing that
it's much simpler in this case.
isaacs [Thu, 28 Feb 2013 23:32:32 +0000 (15:32 -0800)]
stream: There is no _read cb, there is only push
This makes it so that `stream.push(chunk)` is the only way to signal the
end of reading, removing the confusing disparity between the
callback-style _read method, and the fact that most real-world streams
do not have a 1:1 corollation between the "please give me data" event,
and the actual arrival of a chunk of data.
It is still possible, of course, to implement a `CallbackReadable` on
top of this. Simply provide a method like this as the callback:
function readCallback(er, chunk) {
if (er)
stream.emit('error', er);
else
stream.push(chunk);
}
However, *only* fs streams actually would behave in this way, so it
makes not a lot of sense to make TCP, TLS, HTTP, and all the rest have
to bend into this uncomfortable paradigm.
isaacs [Thu, 28 Feb 2013 03:32:19 +0000 (19:32 -0800)]
stream: Add stream.unshift(chunk)
isaacs [Thu, 28 Feb 2013 00:56:30 +0000 (16:56 -0800)]
stream: Break up the onread function
A primary motivation of this is to make the onread function more
inline-friendly, but also to make it more easy to explore not having
onread at all, in favor of always using push() to signal the end of
reading.
Ben Noordhuis [Thu, 28 Feb 2013 22:25:29 +0000 (23:25 +0100)]
net: omit superfluous 'connect' event
Don't emit a 'connect' event on sockets that are handed off to
net.Server 'connection' event listeners.
1. It's superfluous because the connection has already been established
at that point.
2. The implementation is arguably wrong because the event is emitted on
the same tick of the event loop while the rule of thumb is to always
emit it on the next one.
This has been tried before in commit f0a440d but was reverted again in
ede1acc because the change was incomplete (at least one test hadn't
been updated).
Fixes #1047 (again).
Ben Noordhuis [Fri, 1 Mar 2013 01:04:29 +0000 (02:04 +0100)]
deps: upgrade libuv to 2a8d2a5
Ben Noordhuis [Thu, 28 Feb 2013 23:44:55 +0000 (00:44 +0100)]
test: disable simple/test-process-getgroups on os x
The output of `id -G` is unreliable on OS X. It uses an undocumented
Libsystem function called getgrouplist_2() that includes some auxiliary
groups that the POSIX getgroups() function does not return.
Or rather, not always. It leads to fun bug chases where the test fails
in one terminal but not in another.
Eugene Girshov [Sat, 23 Feb 2013 16:59:05 +0000 (18:59 +0200)]
doc: remove note about close event
Ben Noordhuis [Thu, 28 Feb 2013 22:13:54 +0000 (23:13 +0100)]
Merge remote-tracking branch 'origin/v0.8'
Timothy J Fontaine [Thu, 28 Feb 2013 19:46:59 +0000 (11:46 -0800)]
test: fix tap output on windows
Test output is always \n and not platform dependent
Ben Noordhuis [Thu, 28 Feb 2013 16:50:14 +0000 (17:50 +0100)]
lib, src: remove errno global
Remove the errno global. It's a property on the process object now.
Fixes #3095.
Scott Blomquist [Thu, 28 Feb 2013 17:18:12 +0000 (09:18 -0800)]
test: add cleanup to long path test
Ben Noordhuis [Thu, 28 Feb 2013 15:58:24 +0000 (16:58 +0100)]
Merge remote-tracking branch 'origin/v0.8'
Conflicts:
AUTHORS
ChangeLog
deps/uv/src/unix/pipe.c
lib/http.js
src/node_version.h
Ben Noordhuis [Thu, 28 Feb 2013 15:35:17 +0000 (16:35 +0100)]
build, windows: disable SEH
Turn off safe exception handlers, they're incompatible with how
openssl is compiled / linked under MSVS 2012.
Addresses the following build error:
openssl.lib(x86cpuid.obj) : error LNK2026: module unsafe for SAFESEH
image. [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
openssl.lib(x86.obj) : error LNK2026: module unsafe for SAFESEH
image. [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
# etc. etc.
g:\jenkins\workspace\nodejs-oneoff\Release\node.exe : fatal error
LNK1281: Unable to generate SAFESEH image.
[g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
Fixes #4242.
Ben Noordhuis [Thu, 28 Feb 2013 15:30:45 +0000 (16:30 +0100)]
doc: update instructions on home page
Document how to run the example on the home page in more detail.
Apparently our Windows brethren are prone to double-clicking on the
binary instead of running it from the command line.
Fixes #4854.
Trevor Norris [Wed, 27 Feb 2013 19:46:35 +0000 (11:46 -0800)]
process: separate nextTick domain logic
It's cleaner to only load domain ticker logic when the domains are being
used. This makes execution slightly quicker in both cases, and simpler
from the spinner since there is no need to check if the latest callback
requires use of domains.
isaacs [Wed, 27 Feb 2013 19:24:02 +0000 (11:24 -0800)]
core: Remove the nextTick for running the main file
Not necessary, since we can handle the error properly on the first tick
now, even if there are event listeners, etc.
Additionally, this removes the unnecessary "_needTickCallback" from
startup, since Module.loadMain() will kick off a nextTick callback right
after it runs the main module.
Fix #4856
isaacs [Wed, 27 Feb 2013 19:23:20 +0000 (11:23 -0800)]
core: Mark exit() calls with status codes
Also, exit with 128+n for signal exit n, as is The Unix Way.
Ben Noordhuis [Wed, 27 Feb 2013 22:31:38 +0000 (23:31 +0100)]
crypto: clear error stack
Clear OpenSSL's error stack on return from Connection::HandleSSLError().
This stops stale errors from popping up later in the lifecycle of the
SSL connection where they would cause spurious failures.
This commit causes a 1-2% performance regression on `make bench-tls`.
We'll address that in follow-up commits if possible but let's ensure
correctness first.
Fixes #4771.
Scott Blomquist [Wed, 27 Feb 2013 06:52:58 +0000 (22:52 -0800)]
openssl: regenerate asm files for openssl 1.0.1e
isaacs [Mon, 25 Feb 2013 06:14:30 +0000 (22:14 -0800)]
stream: Writables are not pipe()able
This handles the fact that stream.Writable inherits from the Stream class,
meaning that it has the legacy pipe() method. Override that with a pipe()
method that emits an error.
Ensure that Duplex streams ARE still pipe()able, however.
Since the 'readable' flag on streams is sometimes temporary, it's probably
better not to put too much weight on that. But if something is an instanceof
Writable, rather than of Readable or Duplex, then it's safe to say that
reading from it is the wrong thing to do.
Fix #3647
isaacs [Wed, 27 Feb 2013 01:54:18 +0000 (17:54 -0800)]
test: Use common.PORT in simple/test-http-timeout
isaacs [Wed, 27 Feb 2013 01:39:04 +0000 (17:39 -0800)]
test: Move test-net-connect-timeout to test/internet
It is not a valid test unless you're connected to the internet, and causes
a lot of spurious failures on Linux anyway, as it's highly dependent on
timing of things that we don't have any control over.
isaacs [Wed, 27 Feb 2013 01:33:30 +0000 (17:33 -0800)]
test: Use common.PORT to determine debugger port
isaacs [Wed, 27 Feb 2013 00:42:47 +0000 (16:42 -0800)]
test: Fix debugger repl tests
This makes the output of simple/test-debugger-repl and
simle/test-debugger-repl-utf8 mirror an actual debugger session, so it's
a bit easier to reason about.
Also, it uses the same code for both, and fixes it so that it doesn't
leave zombie processes lying around when it crashes.
Run 1000 times without any failures or zombies.
isaacs [Tue, 26 Feb 2013 01:46:48 +0000 (17:46 -0800)]
test: catch break in simple/test-debugger-client
Handle break events that come out sometimes, by telling it to continue.
Also, send the child a SIGTERM when it times out.
isaacs [Wed, 27 Feb 2013 00:36:56 +0000 (16:36 -0800)]
core: Use a uv_signal for debug listener
Starting the debugger directly in the SIGUSR1 signal handler results in
a malloc lock contention ~1% of the time. It hangs the test, which is
annoying on a daily basis to all of us, but it also is pretty terrible
if you actually want to debug a node process that has gone sideways.
Credit to @bnoordhuis for most of this. I just added the unref which
keeps it from messing up the event loop for other stuff.