Skip to content
Snippets Groups Projects
Alexandre Janniaux's avatar
Alexandre Janniaux authored
The handling through GCD was added back then in commit
cc07bce0. In that commit,
signal(SIGCHLD, SIG_DFL) was already called to ensure the behavior of
the signal is restored to default handlers.

In `man 3 signal` from the macos manual, it is said that when setting
SIG_IGN for SIGCHLD, the operating system will not create zombie process
and the exit status will be ignored. We do want to avoid creating zombie
process but we also want to have exit status, which means we do indeed
need the SIG_DFL handler here. See also the following commit on the
linux side: 94763831.

However, GCD was used to automatically call waitpid() on the process
that are being signalled as closing. Since we're always calling waitpid
when spawning any process, this duplicates the handling. But the clients
are actually using vlc_waitpid which is checking errno != ECHILD, so it
would break as soon as the GCD handler is executed before the
vlc_waitpid call.

Since every cases are explicitely calling vlc_waitpid(), do as linux and
just remove the specific GCD handling.

Co-authored-by: default avatarMarvin Scholz <epirat07@gmail.com>

Fixes #29099
120b4939