]> git.ipfire.org Git - thirdparty/git.git/commit
daemon: use sigaction() to install child_handler()
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Thu, 10 Jul 2025 19:45:43 +0000 (19:45 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Jul 2025 21:19:57 +0000 (14:19 -0700)
commitd83e1eef3bbf8cd85ce5ffc4afff3fbdfb006fd1
tree2f671174ac126259f7736c9da5644548ab4ffc37
parentef03aa432ab7fffa81a866ec21e08ecd8a876a26
daemon: use sigaction() to install child_handler()

Replace signal() with an equivalent invocation of sigaction(), but
make sure to NOT set SA_RESTART so the original code that expects
to be interrupted when children complete still works as designed.

This change has the added benefit of using BSD signal semantics reliably
and therefore not needing the rearming call in the signal handler.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon.c