From 0600edaa5c1a04547bd6b1e0431660d6833074cd Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Fri, 5 Mar 2021 10:08:25 +0900 Subject: Imported Upstream version 1.20.2 --- lib/fatal-signal.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib/fatal-signal.h') diff --git a/lib/fatal-signal.h b/lib/fatal-signal.h index 41b4af7..8ac57cf 100644 --- a/lib/fatal-signal.h +++ b/lib/fatal-signal.h @@ -1,5 +1,5 @@ /* Emergency actions in case of a fatal signal. - Copyright (C) 2003-2004, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2003-2004, 2009-2019 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software: you can redistribute it and/or modify @@ -36,7 +36,8 @@ extern "C" { occurs. Restrictions for the cleanup function: - - The cleanup function can do all kinds of system calls. + - The cleanup function can do all kinds of system calls. It may also + modify (clobber) errno. - It can also access application dependent memory locations and data structures provided they are in a consistent state. One way to ensure this is through block_fatal_signals()/unblock_fatal_signals(), see @@ -51,7 +52,7 @@ extern "C" { The cleanup function is executed asynchronously. It is unspecified whether during its execution the catchable fatal signals are blocked or not. */ -extern void at_fatal_signal (void (*function) (void)); +extern void at_fatal_signal (_GL_ASYNC_SAFE void (*function) (int sig)); /* Sometimes it is necessary to block the usually fatal signals while the @@ -71,6 +72,12 @@ extern void block_fatal_signals (void); extern void unblock_fatal_signals (void); +/* Return the list of signals that block_fatal_signals/unblock_fatal_signals + would block or unblock. + Fills signals[0..count-1] and returns count. */ +extern unsigned int get_fatal_signals (int signals[64]); + + #ifdef __cplusplus } #endif -- cgit v1.2.3