René's URL Explorer Experiment


Title: add fs.mkstemp (lib_uv recently landed uv_fs_mkstemp #21) · Issue #33890 · nodejs/node · GitHub

Open Graph Title: add fs.mkstemp (lib_uv recently landed uv_fs_mkstemp #21) · Issue #33890 · nodejs/node

X Title: add fs.mkstemp (lib_uv recently landed uv_fs_mkstemp #21) · Issue #33890 · nodejs/node

Description: Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.

Open Graph Description: Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.

X Description: Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.

Opengraph URL: https://github.com/nodejs/node

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"add fs.mkstemp (lib_uv recently landed uv_fs_mkstemp #21)","articleBody":"\u003c!--\r\nThank you for suggesting an idea to make Node.js better.\r\n\r\nPlease fill in as much of the template below as you're able.\r\n-->\r\n\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.**\r\nPlease describe the problem you are trying to solve.\r\ni have a build-system (in debian-docker under windows) that async-updates files w/ multiple child_processes doing `fs.writeFile, fs.unlink, fs.link`.\r\nthere are occasional race-conditions (i can't discern how) where one child_process writing to a file while another child_process unlinking-and-hardlinking ends up with file unlinked.\r\n\r\n\r\n\r\n**Describe the solution you'd like**\r\nPlease describe the desired behavior.\r\nmkstemp would make file-writes \"atomic\" by writing to tmpfile and then \"atomically\" rename it to destination.  this might resolve the race condition from my multiple child_processes and allow the final hardlink to succeed.\r\n\r\nideal solution of atomic file-write with mkstemp:\r\n```js\r\n/*jslint browser, node*/\r\n/*global os*/\r\nfunction fsWriteFileWithMkdirpAtomic(pathname, data, onError) {\r\n/*\r\n * this file with async-atomically write \u003cdata> to \u003cpathname> with auto mkdir -p\r\n */\r\n    let fs;\r\n    let path;\r\n    let throwOnError;\r\n    throwOnError = function (err) {\r\n    /*\r\n     * this function will throw \u003cerr> if exists\r\n     * we typically want program to crash on \u003cerr> in ci/build use-case\r\n     */\r\n        if (err) {\r\n            throw err;\r\n        }\r\n    };\r\n    try {\r\n        fs = require(\"fs\");\r\n        path = require(\"path\");\r\n        // win32-compat\r\n        pathname = path.resolve(pathname);\r\n    } catch (ignore) {\r\n        // do nothing in browser-env\r\n        onError();\r\n        return;\r\n    }\r\n    fs.mkstemp(os.tmpdir(), function (err, tmpfile) {\r\n        throwOnError(err);\r\n        fs.writeFile(tmpfile, data, function (err) {\r\n            throwOnError(err);\r\n            // fs.rename attempt #1\r\n            fs.rename(tmpfile, pathname, function (err) {\r\n                if (!err) {\r\n                    onError();\r\n                    return;\r\n                }\r\n                // mkdir -p\r\n                fs.mkdirp(path.dirname(pathname), {\r\n                    recursive: true\r\n                }, function (ignore) {\r\n                    // fs.rename attempt #2\r\n                    fs.rename(tmpfile, pathname, function (err) {\r\n                        throwOnError(err);\r\n                        onError();\r\n                    });\r\n                });\r\n            });\r\n        });\r\n    });\r\n}\r\nfsWriteFileWithMkdirpAtomic(\"aa/bb/cc/dd/foo\", \"hello world\", function () {\r\n    console.log(\"successfully wrote file atomically with no race-condition\");\r\n});\r\n```\r\n\r\n\r\n**Describe alternatives you've considered**\r\nPlease describe alternative solutions or features you have considered.\r\n\r\n* use a random generator to create tmpfile in os.tmpdir(), which is not idead for obvious reasons.\r\n* or use `fs.mkdtemp` and deal with cleaninup tmpdir after atomic-write, which again, not ideal.\r\n","author":{"url":"https://github.com/kaizhu256","@type":"Person","name":"kaizhu256"},"datePublished":"2020-06-15T08:57:47Z","url":"https://github.com/nodejs/node/issues/33890"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:b112944c-c29c-9b81-bcd4-abf05f87bde0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id811E:3DE7C3:14AA6D:1A2A96:6B0339BF
html-safe-nonce8d40c6f9c31ba3b2e06c00358e2565451a1af9b520eac6c734e5e5f08aa36e97
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTFFOjNERTdDMzoxNEFBNkQ6MUEyQTk2OjZCMDMzOUJGIiwidmlzaXRvcl9pZCI6IjMzODk2MDg5NjY1NTUzODQyNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccc5a1f5b6b44036fbf37dfb74d8611858724e60d0bb3bbaf906218655a868f32
hovercard-subject-tagrepository:27193779
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodejs/node/issues/33890
twitter:imagehttps://opengraph.githubassets.com/419c8eede4acea769cde62d931cd57dc40c83a62e950fae7609f453d5580b92a/nodejs/node
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/419c8eede4acea769cde62d931cd57dc40c83a62e950fae7609f453d5580b92a/nodejs/node
og:image:altNode.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-cache
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/33890#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F33890
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F33890
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/33890
Reloadhttps://github.com/nodejs/node/issues/33890
Reloadhttps://github.com/nodejs/node/issues/33890
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/33890
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/33890
add fs.mkstemp (lib_uv recently landed uv_fs_mkstemp #21)https://github.com/nodejs/node/issues/33890#top
https://github.com/kaizhu256
kaizhu256https://github.com/kaizhu256
on Jun 15, 2020https://github.com/nodejs/node/issues/33890#issue-638669677
https://github.com/targos
targoshttps://github.com/targos
on Jun 15, 2020https://github.com/nodejs/node/issues/33890#issuecomment-644006601
#33549https://github.com/nodejs/node/pull/33549
https://github.com/kaizhu256
kaizhu256https://github.com/kaizhu256
on Jun 15, 2020https://github.com/nodejs/node/issues/33890#issuecomment-644124983
kaizhu256https://github.com/kaizhu256
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 15, 2020https://github.com/nodejs/node/issues/33890#event-3444319167
nodejs-github-bothttps://github.com/nodejs-github-bot
on Oct 19, 2026https://github.com/nodejs/node/issues/33890#event-33605358107
fs: add mkstemp()https://github.com/nodejs/node/commit/1a885caa6e7f5fb0372ba774c021335b7389dda9
1a885cahttps://github.com/nodejs/node/commit/1a885caa6e7f5fb0372ba774c021335b7389dda9
aduh95https://github.com/aduh95
on Nov 12, 2026https://github.com/nodejs/node/issues/33890#event-35938459843
fs: add mkstemp()https://github.com/nodejs/node/commit/a2f43ceb19e5067072a677c9357c25f04c6eae48
a2f43cehttps://github.com/nodejs/node/commit/a2f43ceb19e5067072a677c9357c25f04c6eae48
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/33890
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/33890
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.