Rich Trott
fdd59cc04c
doc: update BUILDING.md
...
* General copy-editing
* Move `[sudo] make install` step from general Unix build to own step
* Remove `make test-addons` as that is now covered by `make test`
* Standardize on `/path/to/foo` as used elsewhere in the doc
* Change `node -e` to `./node -e` to avoid using different node binary
PR-URL: https://github.com/nodejs/node/pull/8398
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-09-13 17:04:42 -07:00
atstojanov
1640e7a4da
crypto: fix getDecoder() encoding check
...
Normalize the encoding in getDecoder() before using it. Fixes an
AssertionError: "Cannot change encoding" when encoding is "ucs2",
"ucs-2" or "utf-16le"
Fixes: https://github.com/nodejs/node/issues/8236
PR-URL: https://github.com/nodejs/node/pull/8301
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-09-13 17:04:42 -07:00
Ali Ijaz Sheikh
9c460d7475
deps: add back no-op harmony shipping flags
...
Add back the no-op harmony shipping flags that were removed in V8 5.1
to increase compatibility with V8 5.0 that we had been shipping before
v6.5.0. These flags do nothing.
Fixes: https://github.com/nodejs/node/issues/8388
Ref: https://github.com/nodejs/node/pull/8395
PR-URL: https://github.com/nodejs/node/pull/8445
Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net >
Reviewed-By: thealphanerd - Myles Borins <myles.borins@gmail.com >
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com >
Reviewed-By: evanlucas - Evan Lucas <evanlucas@me.com >
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl >
2016-09-13 16:25:22 -07:00
James M Snell
dd51b1f428
buffer,string_decoder: consolidate encoding validation logic
...
Buffer.isEncoding and string_decoder.normalizeEncoding shared
quite a bit of logic. This moves the primary logic into
internal/util. The userland modules that monkey patch Buffer.isEncoding
should still work.
PR-URL: https://github.com/nodejs/node/pull/7207
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Refs: https://github.com/nodejs/node/pull/8463
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-09-13 16:13:09 -07:00
Rich Trott
49f996f4f6
crypto: make malloc failure check cross-platform
...
`malloc(0)` may return NULL on some platforms. Do not report
out-of-memory error unless `malloc` was passed a number greater than
`0`.
PR-URL: https://github.com/nodejs/node/pull/8352
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-09-09 11:06:21 -04:00
Michael Dawson
d1d1433b02
src: normalize malloc, realloc
...
malloc(0) and realloc(ptr, 0) have implementation-defined behavior in
that the standard allows them to either return a unique pointer or a
nullptr for zero-sized allocation requests. Normalize by always using
a nullptr.
- Introduce node::malloc, node::realloc and node::calloc that should
be used throught our source.
- Update all existing node source files to use the new functions
instead of the native allocation functions.
Fixes: https://github.com/nodejs/node/issues/7549
PR-URL: https://github.com/nodejs/node/pull/7564
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Conflicts:
src/node.cc
2016-09-09 11:06:21 -04:00
Josh Gavant
d0a92be798
doc: add 2016-08-10 CTC meeting minutes
...
PR-URL: https://github.com/nodejs/node/pull/8229
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-09-09 11:06:21 -04:00
Michael Dawson
6d07e57a36
test: mark pseudo-tty/no_dropped_stdio as flaky
...
We've determined there is a test issue related to python as
opposed to node, mark as flaky until we can resolve
PR-URL: https://github.com/nodejs/node/pull/8385
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-09-09 11:06:20 -04:00
Ben Noordhuis
2c2a21ab56
src: unbreak build when compiling against uclibc
...
It seems that it is possible with some toolchains for both `__GLIBC__`
and `__UCLIBC__` to be defined, confusing our "do we have execinfo.h?"
logic.
Assume that when `__UCLIBC__` is defined, we are dealing with a libc
that does not have execinfo.h.
Fixes: https://github.com/nodejs/node/issues/8233
PR-URL: https://github.com/nodejs/node/pull/8308
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-09-09 11:06:20 -04:00
Daniel Bevenius
4e368c58ff
src: moving f function call comment
...
The comment about calling the f function seems to have drifted
a little. Moving it to be closer to the actual call.
PR-URL: https://github.com/nodejs/node/pull/8405
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-09-09 11:06:20 -04:00
Rich Trott
ca31187087
doc: update CI content in onboarding doc
...
* add node-test-pull-request link
* minor formatting improvements
PR-URL: https://github.com/nodejs/node/pull/8374
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
2016-09-09 11:06:20 -04:00
James M Snell
44983b1fdc
doc: update authors list
...
It's that time again! Another round of author list updates.
PR-URL: https://github.com/nodejs/node/pull/8346
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2016-09-09 11:06:19 -04:00
Mike Ralphson
ee83f5d541
doc: add return type of clientRequest.setTimeout
...
Refs: https://github.com/nodejs/node/pull/1699
PR-URL: https://github.com/nodejs/node/pull/8356
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2016-09-09 11:06:19 -04:00
Alexis374
1695c84240
doc: fix a wrong link,add '.md' to the link
...
fix a wrong link to ../topics/the-event-loop-timers-and-nexttick.md
PR-URL: https://github.com/nodejs/node/pull/8315
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-09-09 11:06:19 -04:00
Mike Ralphson
65096de443
doc: fix typos
...
PR-URL: https://github.com/nodejs/node/pull/8370
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-09-09 11:06:18 -04:00
Eugene Ostroukhov
b603ac24cb
inspector: use script name for target title
...
Changes inspector integration to use Node.js script file name as target
title (reported in JSON and shown in developer tools UIs). It will also
report file:// URL for the script as some tools seem to use that field
to open the script in the editor.
PR-URL: https://github.com/nodejs/node/pull/8243
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl >
Conflicts:
src/node.cc
2016-09-09 11:06:18 -04:00
Rich Trott
680a4c8b8e
test: test non-buffer/string with zlib
...
Check the error condition testing for passing something other than a
string or buffer. Currently, there are no tests for this.
PR-URL: https://github.com/nodejs/node/pull/8350
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed By: James M Snell <jasnell@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2016-09-09 11:06:18 -04:00
Santiago Gimeno
f0300eda27
test: fix test-cluster-dgram-1 flakiness
...
Check for the number of messages received in the `exit` event listener
instead of the `disconnect` listener.
Fixes: https://github.com/nodejs/node/issues/8380
PR-URL: https://github.com/nodejs/node/pull/8383
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed By: James M Snell <jasnell@gmail.com >
2016-09-09 11:06:18 -04:00
Brian White
6d421a2ee2
doc: fix broken link in dgram doc
...
PR-URL: https://github.com/nodejs/node/pull/8365
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2016-09-09 11:06:17 -04:00
James M Snell
fbabd36de9
doc: update targos email in readme per request
...
PR-URL: https://github.com/nodejs/node/pull/8389
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-09-09 11:06:17 -04:00
Gibson Fahnestock
b8fa7c949d
test: fix ::1 error in test-dns-ipv6
...
If ::1 can't be resolved, the test should still pass.
PR-URL: https://github.com/nodejs/node/pull/8254
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-09-09 11:06:17 -04:00
Rich Trott
76a3050c34
doc: update landing pr info in onboarding doc
...
Reword and re-organize. Only significant content change is to
specifically call out the two-CTC-member-LGTM requirement for
semver-major changes.
PR-URL: https://github.com/nodejs/node/pull/8344
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2016-09-09 11:06:16 -04:00
Santiago Gimeno
c07e063dd9
test: fix fs-watch-recursive flakiness on OS X
...
The test is sometimes timing out because of a race condition between
the fs event generated on file creation and the event being registered
in the kqueue. To avoid this problem, create the file after 100 ms,
that is the value used in the `fs_event_watch_dir_recursive` libuv test.
PR-URL: https://github.com/nodejs/node/pull/4629
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-09-09 11:06:16 -04:00
Dan Fabulich
372e4f3f79
doc: bad/better examples for fs.access() and fs.exists()
...
PR-URL: https://github.com/nodejs/node/pull/7832
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-09-09 11:06:16 -04:00
James M Snell
1aa7168e91
test: refactor/cleanup a number of cluster tests
...
* Move shared code into common
* Favor use of strictEqual
* Add some missing common.mustCalls
* Other general cleanup
PR-URL: https://github.com/nodejs/node/pull/8261
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2016-09-09 11:06:16 -04:00
Johan Bergström
a830e37dc9
build: don't require processing docs for nightlies
...
Opt-out `nightly` and `next-nightly` from the documentation
requirement since these docs aren't meant to be published.
This fixes our nightly jobs in CI.
PR-URL: https://github.com/nodejs/node/pull/8325
Fixes: https://github.com/nodejs/build/issues/478
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-09-09 11:06:15 -04:00
Hubert Mine
9f18878eee
doc: fix typo in stream doc
...
PR-URL: https://github.com/nodejs/node/pull/8326
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-09-09 11:06:15 -04:00
Ali Ijaz Sheikh
c8bcf1b591
deps: workaround clang-3.4 ICE
...
PR-URL: https://github.com/nodejs/node/pull/8343
Fixes: https://github.com/nodejs/node/issues/8323
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org >
2016-09-09 11:06:15 -04:00
Rich Trott
39cf7bf24d
test: refactor parallel/test-process-env.js
...
* Remove disabling of lint rule
* == -> ===
* var -> const
PR-URL: https://github.com/nodejs/node/pull/8324
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com >
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com >
2016-09-09 11:06:15 -04:00
Daniel Bevenius
59e96bb1af
doc: adding danbev to collaborators
...
PR-URL: https://github.com/nodejs/node/pull/8359
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Jeremiah Senkpiel <Fishrock123@rocketmail.com >
2016-09-09 11:06:14 -04:00
Ali Ijaz Sheikh
0f2c619f55
src: avoid duplicate AtExit functions
...
node.cc had two functions with the name AtExit with entirely different
purposes:
* node::AtExit(): file static; used to register the atexit(3) handler
for the Node process.
* node::AtExit(void (*)(void*), void*): publicly exported symbol that
addons can use to request callbacks upon exit.
For code readability it is better to avoid the unintentional overload.
PR-URL: https://github.com/nodejs/node/pull/8273
Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net >
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com >
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl >
2016-09-09 11:06:14 -04:00
Eugene Ostroukhov
13a522ac39
inspector: make sure all messages are dispatched
...
This fixes a race condition when messages are coming while V8 is still
dispatching the previous batch.
PR-URL: https://github.com/nodejs/node/pull/8264
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl >
2016-09-09 11:06:14 -04:00
Eugene Ostroukhov
250a380231
inspector: simplify buffer management
...
This change simplifies buffer management to address a number of issues
that original implementation had.
Original implementation was trying to reduce the number of allocations
by providing regions of the internal buffer to libuv IO code. This
introduced some potential use after free issues if the buffer grows
(or shrinks) while there's a pending read. It also had some confusing
math that resulted in issues on Windows version of the libuv.
PR-URL: https://github.com/nodejs/node/pull/8257
Fixes: https://github.com/nodejs/node/issues/8155
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl >
2016-09-09 11:06:13 -04:00
Rich Trott
40e84218a0
test: add test for zlib.create*Raw()
...
Currently, there are no tests that exercise `zlib.createInflateRaw()` or
`zlib.createDeflateRaw()`.
This adds minimal tests that invoke the functions and confirm that they
return `zlib.InflateRaw`/`zlib.DeflateRaw` objects.
PR-URL: https://github.com/nodejs/node/pull/8306
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-09-09 11:06:13 -04:00
Paul Grock
cc61d1a3ba
test: cleanup test require symlink
...
* Changed `==` to `includes` for clarity.
* Switched to `assert.strictEqual` from `assert.equal`
* Changed some `var` to `const`
* Test cleanup with `common.refreshTmpDir`
PR-URL: https://github.com/nodejs/node/pull/8305
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-09-09 11:06:13 -04:00
James M Snell
b553e57f5f
doc: clarify that path on windows accepts / and \
...
Fixes: https://github.com/nodejs/node/issues/6520
PR-URL: https://github.com/nodejs/node/pull/8291
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-09-09 11:06:13 -04:00
Rich Trott
773e1c1304
tools: enable caching for jslint task
...
PR-URL: https://github.com/nodejs/node/pull/8296
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-09-09 11:06:12 -04:00
Rich Trott
54f689fc1e
tools: update ESLint to 3.4.0
...
PR-URL: https://github.com/nodejs/node/pull/8296
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-09-09 11:06:12 -04:00
Anna Henningsen
605db31fe7
events: make memory leak warning more accessible
...
This makes the famous `EventEmitter memory leak` warnings occurring
when the listener count for a given event exceeds a specified number
more programatically accessible, by giving them properties referring
to the event emitter instance and the event itself.
This can be useful for debugging the origins of such a warning when
the stack itself doesn’t reveal enough information about the event
emitter instance itself, e.g. when manual inspection of the
already-registered listeners is expected to be useful.
PR-URL: https://github.com/nodejs/node/pull/8298
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <Fishrock123@rocketmail.com >
2016-09-09 11:06:12 -04:00
Eugene Ostroukhov
354166c061
inspector: use new inspector headers
...
PR-URL: https://github.com/nodejs/node/pull/8150
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl >
2016-09-09 11:06:11 -04:00
Eugene Ostroukhov
ac3471ca23
deps: v8_inspector update
...
Pick up latest from [1] corresponding to the Blink commit 60cd6e859b.
[1]: https://github.com/pavelfeldman/v8_inspector/commit/55f21a5611
PR-URL: https://github.com/nodejs/node/pull/8150
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl >
2016-09-09 11:06:11 -04:00
Luigi Pinca
feab3d4c25
doc: add lpinca to collaborators
...
PR-URL: https://github.com/nodejs/node/pull/8331
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-09-09 11:06:11 -04:00
Rich Trott
cde0a1edfd
test: refactor test-debug-signal-cluster
...
Notable changes include removing one (but not all) hard-coded ports,
using `common.fail()`, and tidying conditionals and assertions.
PR-URL: https://github.com/nodejs/node/pull/8289
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Conflicts:
test/parallel/test-debug-signal-cluster.js
2016-09-09 11:06:10 -04:00
James M Snell
d2b2abe9d9
doc: doc that listen can be called multiple times
...
Fixes: https://github.com/nodejs/node/issues/4646
PR-URL: https://github.com/nodejs/node/pull/8294
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-09-09 11:06:10 -04:00
James M Snell
54d76137cd
doc: readline write() is processed as input
...
Fixes: https://github.com/nodejs/node/issues/4402
PR-URL: https://github.com/nodejs/node/pull/8295
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-09-09 11:06:10 -04:00
James M Snell
bc6a7ca8e7
test: additional refactoring/cleanup of buffer tests
...
* Favor use of strictEqual where possible
* Use const as appropriate
* Other miscellaneous cleanups
PR-URL: https://github.com/nodejs/node/pull/8283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-09-09 11:06:10 -04:00
James M Snell
48be8bc4e1
doc: 'ipc' is required with fork stdio option
...
Fixes: https://github.com/nodejs/node/issues/8167
PR-URL: https://github.com/nodejs/node/pull/8290
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2016-09-09 11:06:09 -04:00
James M Snell
5d43131af4
test: add known issue test for path parse issue #6229
...
Refs: https://github.com/nodejs/node/issues/6229
PR-URL: https://github.com/nodejs/node/pull/8293
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-09-09 11:06:09 -04:00
Michael Dawson
836bfc188b
build: fix dependencies on AIX
...
Addon tests were still starting to run before the node exp file
creation was complete.
- remove process_outputs_as_sources as it did not fix the
problem
- update create_expfile.sh so that exp file is created in a
temporary file and then renamed to final name so that
file is only visible once it is complete
- update target used in building Addons so that for
AIX it depends on the exp file being available
PR-URL: https://github.com/nodejs/node/pull/8285
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2016-09-09 11:06:09 -04:00
Sakthipriyan Vairamani
47ecd21133
doc: improve fs.truncate functions' documentation
...
The default value of the `len` parameter is zero and it is included in
the documenetation.
This patch also has examples of how `ftruncate` can be used.
PR-URL: https://github.com/nodejs/node/pull/7648
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-09-09 11:06:08 -04:00