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/
27fafd4648
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. |
||
---|---|---|
benchmark | ||
deps | ||
doc | ||
lib | ||
src | ||
test | ||
tools | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
AUTHORS | ||
BSDmakefile | ||
ChangeLog | ||
common.gypi | ||
configure | ||
CONTRIBUTING.md | ||
LICENSE | ||
Makefile | ||
node.gyp | ||
README.md | ||
vcbuild.bat |
Evented I/O for V8 javascript.
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