Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorRobert Nagy <ronagy@icloud.com>2019-12-14 22:47:01 +0300
committerMyles Borins <mylesborins@google.com>2019-12-18 02:21:13 +0300
commit3abcb69c3e79d25e72ae2353c46c464929712efa (patch)
treebcd13ae8f4dd6600814dde1d01db673112c52eb9 /doc/api
parent5e268b8dbead4d71394353a2154ff5798880e1db (diff)
doc: add note about fs.close() about undefined behavior
Add notes to fs.close and fs.closeSync() about udnefined behavior. PR-URL: https://github.com/nodejs/node/pull/30966 Refs: https://github.com/nodejs/node/issues/30864 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/fs.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/fs.md b/doc/api/fs.md
index 643efaae033..a6372f3b115 100644
--- a/doc/api/fs.md
+++ b/doc/api/fs.md
@@ -1533,6 +1533,9 @@ changes:
Asynchronous close(2). No arguments other than a possible exception are given
to the completion callback.
+Calling `fs.close()` on any file descriptor (`fd`) that is currently in use
+through any other `fs` operation may lead to undefined behavior.
+
## fs.closeSync(fd)
<!-- YAML
added: v0.1.21
@@ -1542,6 +1545,9 @@ added: v0.1.21
Synchronous close(2). Returns `undefined`.
+Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use
+through any other `fs` operation may lead to undefined behavior.
+
## fs.constants
* {Object}