mirror of
https://github.com/nodejs/node.git
synced 2025-05-20 19:24:39 +00:00

PR-URL: https://github.com/nodejs/node/pull/35566 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
25 lines
556 B
JavaScript
25 lines
556 B
JavaScript
'use strict';
|
|
|
|
// Refs: https://github.com/nodejs/node/issues/34266
|
|
// Failing to close a file should not keep the event loop open.
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
const fs = require('fs');
|
|
|
|
const debuglog = (arg) => {
|
|
console.log(new Date().toLocaleString(), arg);
|
|
};
|
|
|
|
const tmpdir = require('../common/tmpdir');
|
|
tmpdir.refresh();
|
|
|
|
{
|
|
fs.open(`${tmpdir.path}/dummy`, 'wx+', common.mustCall((err, fd) => {
|
|
debuglog('fs open() callback');
|
|
assert.ifError(err);
|
|
}));
|
|
debuglog('waiting for callback');
|
|
}
|