blog: v0.9.10
test: add TAP output to the test runner

This is a back-port of commit 14ed173 from the master branch.
zlib: fix assert on bad input

The following test case occasionally triggered an assert because
write_in_progress_ didn't get cleared on error:

  $ cat test.js
  require('zlib').gunzip('BAM', console.log);
  setTimeout(gc, 10);

  $ while true; do node --expose-gc test.js || break; done
  { [Error: incorrect header check] errno: -3, code: 'Z_DATA_ERROR' }
  Assertion failed: (!write_in_progress_ && "write in progress"),
  function Clear, file ../src/node_zlib.cc, line 71.
  Abort trap: 6

Steps to avoid that:

* Initialize all primitive member fields in the constructor.
* Clear the write_in_progress_ member field in ZCtx::Error().
* Ref the ZCtx object as soon as write_in_progress_ is set to true.
  Before this commit, it could get GC'ed in the time between setting
  the field and the call to ctx->Ref().

Fixes #4783.
doc: add note about child process line buffering

Fixes #4808.
http: Handle hangup writes more gently
http: Do not free the wrong parser on socket close

This appears to fix #4673.  That bug is very hard to reproduce, so it's
hard to tell for certain, but this approach is more correct anyway.

Hat-tip: @dougwilson
uv: Upgrade to 86ae8b3c
2013.02.25, Version 0.8.21 (Stable)

* http: Do not free the wrong parser on socket close (isaacs)

* http: Handle hangup writes more gently (isaacs)

* zlib: fix assert on bad input (Ben Noordhuis)

* test: add TAP output to the test runner (Timothy J Fontaine)

* unix: Handle EINPROGRESS from domain sockets (Ben Noordhuis)
Merge branch 'v0.8.21-release' into v0.8
Now working on 0.8.22
blog: Post for v0.8.21
ChangeLog: Missed item about EINPROGRESS
blog: Update with EINPROGRESS changelog item
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.
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.
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.
test: Use common.PORT to determine debugger port
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.
test: Use common.PORT in simple/test-http-timeout
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