summaryrefslogtreecommitdiff
path: root/lib/wait-process.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-03-19 23:32:42 +0100
committerBruno Haible <bruno@clisp.org>2019-03-19 23:32:42 +0100
commitcf8abf91bee57994da2b891077e6c7d4fb113445 (patch)
tree4c3353547bd197877c8f4218f42cb19336965c07 /lib/wait-process.c
parent661f63a41ac96060878e9fe94e547ded44e3f371 (diff)
downloadgnulib-cf8abf91bee57994da2b891077e6c7d4fb113445.tar.gz
Help making signal handlers more reliable.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Emit definition of _GL_ASYNC_SAFE into config.h. * lib/nanosleep.c (sighandler): Mark as _GL_ASYNC_SAFE. * lib/fatal-signal.h (at_fatal_signal): Add _GL_ASYNC_SAFE marker to argument. * lib/fatal-signal.c (action_t, uninstall_handlers, fatal_signal_handler): Mark as _GL_ASYNC_SAFE. * lib/clean-temp.c (cleanup_action): Mark as _GL_ASYNC_SAFE. * lib/wait-process.c (cleanup_slaves, cleanup_slaves_action): Mark as _GL_ASYNC_SAFE. * lib/c-stack.h (c_stack_action): Add _GL_ASYNC_SAFE marker to argument. * lib/c-stack.c: Add _GL_ASYNC_SAFE markers.
Diffstat (limited to 'lib/wait-process.c')
-rw-r--r--lib/wait-process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/wait-process.c b/lib/wait-process.c
index b51e2447a0..7c6993317e 100644
--- a/lib/wait-process.c
+++ b/lib/wait-process.c
@@ -80,7 +80,7 @@ static size_t slaves_allocated = SIZEOF (static_slaves);
#endif
/* The cleanup action. It gets called asynchronously. */
-static void
+static _GL_ASYNC_SAFE void
cleanup_slaves (void)
{
for (;;)
@@ -104,7 +104,7 @@ cleanup_slaves (void)
/* The cleanup action, taking a signal argument.
It gets called asynchronously. */
-static void
+static _GL_ASYNC_SAFE void
cleanup_slaves_action (int sig _GL_UNUSED)
{
cleanup_slaves ();