Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Airlock – crash isolation for Swift on macOS without fork()

Airlock is a Swift library that provides crash isolation for macOS applications without relying on fork(), allowing developers to run untrusted code safely by isolating it in a separate process.

Background

- Airlock is a new Swift library by Maxim Kotliar that lets developers run untrusted code safely inside a sandboxed helper process, even though macOS has deprecated the traditional `fork()` system call. - On macOS, Apple has been discouraging `fork()` (used by many sandboxing tools), so Airlock uses `posix_spawn()` instead — a more modern, macOS-friendly way to launch a child process. - The key idea is "crash isolation": if the sandboxed code crashes or does something malicious, the main app stays alive. This is similar to how web browsers run each tab in a separate process. - This matters for macOS developers who need to run user-supplied plugins, scripts, or AI-generated code without risking the stability or security of their app.

Related stories

  • The article criticizes the declining quality of macOS app icon design, arguing that Apple's push toward uniform squircle shapes and simplified aesthetics has made modern icons look worse than older, more distinctive designs. It notes that even third-party developers are constrained by Apple's rules, while a few apps like BBEdit and Fantastical still maintain strong icon identities.