1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2026-02-05 18:20:32 +03:00

Merge pull request #2217 from synqa/fix-preserve-errno

Fix preserve errno in SIGCHLD signal handler
This commit is contained in:
Ilya Shipitsin
2026-02-05 15:46:13 +01:00
committed by GitHub

View File

@ -2140,9 +2140,13 @@ void UnixMemoryFree(void *addr)
// SIGCHLD handler
void UnixSigChldHandler(int sig)
{
int old_errno = errno;
// Recall the zombie processes
while (waitpid(-1, NULL, WNOHANG) > 0);
signal(SIGCHLD, UnixSigChldHandler);
errno = old_errno;
}
// Disable core dump