Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 42ccf22

Browse filesBrowse files
ronagtargos
authored andcommitted
doc: add note about fs.close() about undefined behavior
Add notes to fs.close and fs.closeSync() about udnefined behavior. PR-URL: #30966 Refs: #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>
1 parent d676c6c commit 42ccf22
Copy full SHA for 42ccf22

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+6Lines changed: 6 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,9 @@ changes:
15331533
Asynchronous close(2). No arguments other than a possible exception are given
15341534
to the completion callback.
15351535

1536+
Calling `fs.close()` on any file descriptor (`fd`) that is currently in use
1537+
through any other `fs` operation may lead to undefined behavior.
1538+
15361539
## `fs.closeSync(fd)`
15371540
<!-- YAML
15381541
added: v0.1.21
@@ -1542,6 +1545,9 @@ added: v0.1.21
15421545

15431546
Synchronous close(2). Returns `undefined`.
15441547

1548+
Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use
1549+
through any other `fs` operation may lead to undefined behavior.
1550+
15451551
## `fs.constants`
15461552

15471553
* {Object}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.