From a284117394c8cf847e13649ec2a187bedd150f13 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sat, 14 Dec 2019 20:47:01 +0100 Subject: [PATCH 1/6] doc: add note about fs.close undefined behavior --- doc/api/fs.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 643efaae03395d..41467e9089b3d7 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 `fs.read`, `fs.write` or `fs.writev` may lead to undefined behavior. + ## fs.closeSync(fd)