diff options
author | Robert Nagy <ronagy@icloud.com> | 2019-12-14 22:47:01 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-12-17 08:58:18 +0300 |
commit | b376965e503f7cdfc5b2888bd1425f44f79013a9 (patch) | |
tree | e2edb11861ac19da26a4720a2ef514ca1c708f66 /doc | |
parent | 0a2355ff5f38d424d435ec145ce497a938cc9c8b (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')
-rw-r--r-- | doc/api/fs.md | 6 |
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} |