This is done at the apprt-level for a couple reasons.
(1) For libghostty, we don't have a way to know what the embedding
application is doing, so its risky to create signal handlers that
might overwrite the application's signal handlers.
(2) It's extremely messy to deal with signals and multi-threading.
Apprts have framework access that handles this for us.
For GTK, we use g_unix_signal_add.
For macOS, we use `DispatchSource.makeSignalSource`. This is an awkward
API but made for this purpose.
|
||
|---|---|---|
| .. | ||
| Assets.xcassets | ||
| Ghostty.xcodeproj | ||
| Sources | ||
| .gitignore | ||
| Ghostty-Info.plist | ||
| Ghostty.entitlements | ||
| GhosttyDebug.entitlements | ||
| GhosttyReleaseLocal.entitlements | ||