mirror of
https://github.com/apple/container.git
synced 2026-09-12 18:55:43 +00:00
Add support for parent death signal (pdeathSignal) to ensure child processes receive a signal when the parent process dies. This addresses the FIXME comment in Runc.execute(). ## Changes - Add pdeathSignal field to exec_command_attrs C struct - Implement prctl(PR_SET_PDEATHSIG) in child process handler (Linux only) - Expose pdeathSignal through Command.Attrs Swift API - Wire up pdeathSignal in Runc.execute() to remove FIXME ## Implementation Details The implementation uses Linux-specific prctl() to set the parent death signal, ensuring proper cleanup when parent processes terminate. The feature is conditionally compiled for Linux only, maintaining compatibility with other platforms.