TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Spawn your shell like it's the 90s again

141 点作者 mulander将近 9 年前

4 条评论

nothrabannosir将近 9 年前
The posix file system API invites these race conditions. but when I want to access the fs from my app, it often feels like the only choice I have is to just accept it.<p>What can I do to change it? Is there a reliable, widespread and usable successor to the posix API that offers transactions, or &quot;compare and swap&quot;-type operations? Or are we forever caught in this catch 22 between OS writers and application programmers ?<p>I wouldn&#x27;t mind an API that can be (unsafely) simulated on regular posix for compatibility, while being forward compatible with the next gen of file IO on systems that do support it, for example.
评论 #12144520 未加载
评论 #12143665 未加载
评论 #12143843 未加载
评论 #12151241 未加载
评论 #12143589 未加载
1_2__3将近 9 年前
Author is correct, this is an old bug. I can confirm it was at least present in SunOS 4.1.3, because I worked for an ISP back in the 90s that offered shell accounts and we found evidence of attempts all over the place (when you &quot;lose&quot; the race a root-owned file is created, so unless you ever &quot;win&quot; and clean up after yourself there&#x27;s evidence of your attempt).
a1k0n将近 9 年前
Why Korn shell? Is there something special about the way it handles being run w&#x2F; a setuid bit?
评论 #12144511 未加载
评论 #12144697 未加载
asveikau将近 9 年前
Waiting for someone to say this wouldn&#x27;t be possible in rust.<p>Spoiler alert: it would be.
评论 #12146275 未加载
评论 #12143538 未加载