mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00:00
The macOS write watch handles SIGBUS and SIGSEGV for the whole process. When a signal is not a write to a watched page and no handler was installed before it, the handler restored the default action and returned. That ends the process for a real fault, which runs again and faults with the default action, but a SIGBUS or SIGSEGV sent with raise or kill was swallowed: the process kept running. A spawned child that raised SIGBUS exited with its next exit code instead of dying with the signal, so guest_posix_spawn failed on macOS. The handler now raises the signal again after restoring the default action. It is blocked until the handler returns, so a real fault still ends with the same signal, and a sent one now does too. An inherited SIG_IGN keeps the old behaviour.