MCPcopy Index your code
hub / github.com/python/cpython / nodeFsync

Function nodeFsync

Platforms/emscripten/streams.mjs:149–166  ·  view source on GitHub ↗
(fd)

Source from the content-addressed store, hash-verified

147};
148
149function nodeFsync(fd) {
150 try {
151 fs.fsyncSync(fd);
152 } catch (e) {
153 if (e?.code === "EINVAL") {
154 return;
155 }
156 // On Mac, calling fsync when not isatty returns ENOTSUP
157 // On Windows, stdin/stdout/stderr may be closed, returning EBADF or EPERM
158 if (
159 e?.code === "ENOTSUP" || e?.code === "EBADF" || e?.code === "EPERM"
160 ) {
161 return;
162 }
163
164 throw e;
165 }
166}
167
168class NodeReader {
169 constructor(nodeStream) {

Callers 2

fsyncMethod · 0.85
fsyncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…