bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68087: Signal handlers not called after ‘primitive-fork’


From: Ludovic Courtès
Subject: bug#68087: Signal handlers not called after ‘primitive-fork’
Date: Wed, 24 Jan 2024 11:34:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Ludovic Courtès <ludo@gnu.org> skribis:

> Fixes <https://bugs.gnu.org/68087>.
>
> * libguile/scmsigs.h (scm_i_signals_pre_fork, scm_i_signals_post_fork):
> New declarations.
> (scm_i_signal_delivery_thread): Change type to SCM..
> * libguile/threads.c (scm_all_threads): Adjust accordingly and exclude
> threads that have ‘t->exited’.  Access ‘thread_count’ after grabbing
> ‘thread_admin_mutex’.
> * libguile/posix.c (scm_fork): Add calls to ‘scm_i_signals_pre_fork’ and
> ‘scm_i_signals_post_fork’.
> * libguile/scmsigs.c (signal_delivery_thread): Close signal_pipe[0] upon
> exit and set it to -1.
> (once): New file-global variable, moved from…
> (scm_i_ensure_signal_delivery_thread): … here.
> (stop_signal_delivery_thread, scm_i_signals_pre_fork)
> (scm_i_signals_post_fork): New functions.
> * test-suite/standalone/test-sigaction-fork: New file.
> * test-suite/standalone/Makefile.am (check_SCRIPTS, TESTS): Add it.

Pushed as 5a8502a4946e8a5b5c40a127aa240fc6ad960d03.

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]