0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Cross-platform JavaScript runtime environment https://nodejs.org/
Go to file
isaacs 27fafd4648 stream: Do not call endReadable on a non-empty stream
Say that a stream's current read queue has 101 bytes in it, and the
underlying resource has ended (ie, reached EOF).

If you do something like this:

    stream.read(100); // leave a byte behind
    stream.read(0); // read(0) for some reason

then the read(0) will get 0 from the howMuchToRead function.  Since the
stream was ended, this was incorrectly treating the 0 as a "there is no
more in the buffer", and emitting 'end' before that last byte was read.

Why have the read(0) in the first place?  We do this in some cases to
trigger the last few bytes of a net socket (such as a child process's
stdio pipes).  This was causing issues when piping a `git archive` job
to a file: the resulting tarball was incomplete, because it occasionally
was not getting the last chunk.
2013-01-14 15:22:42 -08:00
benchmark benchmark: Make flamegraphs a bit more useful 2012-12-29 15:32:26 -08:00
deps v8: Hardfloat does not imply VFPv3, only VFPv2. 2013-01-13 18:26:58 +01:00
doc Merge remote-tracking branch 'ry/v0.8' into master 2013-01-11 10:18:07 -08:00
lib stream: Do not call endReadable on a non-empty stream 2013-01-14 15:22:42 -08:00
src windows: add support for '_Total' perf counters 2013-01-11 22:24:48 +01:00
test stream: Do not call endReadable on a non-empty stream 2013-01-14 15:22:42 -08:00
tools windows: add support for '_Total' perf counters 2013-01-11 22:24:48 +01:00
.gitattributes Explicitly disable cr/lf conversion for test fixtures 2011-08-10 19:59:37 +02:00
.gitignore gitignore: ignore perf data files 2013-01-14 13:06:29 +01:00
.mailmap Update AUTHORS and .mailmap 2012-10-10 23:14:55 +02:00
.travis.yml test: add .travis.yml for testing on Travis CI 2011-12-05 16:50:55 -08:00
AUTHORS 2013.01.11, Version 0.9.6 (Unstable) 2013-01-11 10:49:21 -08:00
BSDmakefile Tell BSD users to run gmake instead. 2011-07-11 14:17:23 +02:00
ChangeLog 2013.01.11, Version 0.9.6 (Unstable) 2013-01-11 10:49:21 -08:00
common.gypi build: disable use of thin archive 2012-11-21 14:06:37 +01:00
configure configure: define "arm_fpu" and "arm_neon" for ARM 2013-01-10 17:13:59 -08:00
CONTRIBUTING.md doc: add CONTRIBUTING.md 2012-12-31 01:50:48 +01:00
LICENSE deps: upgrade libuv to 665a316 2012-11-16 17:58:42 +01:00
Makefile Merge remote-tracking branch 'ry/v0.8' into master 2013-01-11 10:18:07 -08:00
node.gyp dtrace: x64 ustack helper 2013-01-07 23:04:11 +04:00
README.md doc: document prerequisites in README 2012-09-02 13:32:57 +02:00
vcbuild.bat windows: improve Visual Studio Express build support 2013-01-03 23:38:25 +01:00

Evented I/O for V8 javascript. Build Status

To build:

Prerequisites (Unix only):

* Python 2.6 or 2.7
* GNU Make 3.81 or newer
* libexecinfo (FreeBSD and OpenBSD only)

Unix/Macintosh:

./configure
make
make install

Windows:

vcbuild.bat

To run the tests:

Unix/Macintosh:

make test

Windows:

vcbuild.bat test

To build the documentation:

make doc

To read the documentation:

man doc/node.1

Resources for Newcomers