summaryrefslogtreecommitdiff
path: root/lib/fatal-signal.h
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:25 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:25 +0900
commit0600edaa5c1a04547bd6b1e0431660d6833074cd (patch)
treed099efc896b831b1046baf83d8ba3edb60c6e65c /lib/fatal-signal.h
parent4a9ac8023543db82c39c3db6138a8e8582f51797 (diff)
downloadwget-0600edaa5c1a04547bd6b1e0431660d6833074cd.tar.gz
wget-0600edaa5c1a04547bd6b1e0431660d6833074cd.tar.bz2
wget-0600edaa5c1a04547bd6b1e0431660d6833074cd.zip
Imported Upstream version 1.20.2upstream/1.20.2
Diffstat (limited to 'lib/fatal-signal.h')
-rw-r--r--lib/fatal-signal.h13
1 files changed, 10 insertions, 3 deletions
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 <bruno@clisp.org>, 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