mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Remove unused function setChildSignalMask()
(cherry picked from commit a44dcbff13)
This commit is contained in:
parent
c9380d9736
commit
158efe6cc8
2 changed files with 0 additions and 29 deletions
|
|
@ -42,13 +42,6 @@ extern thread_local std::function<bool()> interruptCheck;
|
|||
|
||||
void _interrupted();
|
||||
|
||||
/**
|
||||
* Sets the signal mask. Like saveSignalMask() but for a signal set that doesn't
|
||||
* necessarily match the current thread's mask.
|
||||
* See saveSignalMask() to set the saved mask to the current mask.
|
||||
*/
|
||||
void setChildSignalMask(sigset_t * sigs);
|
||||
|
||||
/**
|
||||
* Start a thread that handles various signals. Also block those signals
|
||||
* on the current thread (and thus any threads created by it).
|
||||
|
|
@ -60,8 +53,6 @@ void startSignalHandlerThread();
|
|||
/**
|
||||
* Saves the signal mask, which is the signal mask that nix will restore
|
||||
* before creating child processes.
|
||||
* See setChildSignalMask() to set an arbitrary signal mask instead of the
|
||||
* current mask.
|
||||
*/
|
||||
void saveSignalMask();
|
||||
|
||||
|
|
|
|||
|
|
@ -99,26 +99,6 @@ void unix::triggerInterrupt()
|
|||
static sigset_t savedSignalMask;
|
||||
static bool savedSignalMaskIsSet = false;
|
||||
|
||||
void unix::setChildSignalMask(sigset_t * sigs)
|
||||
{
|
||||
assert(sigs); // C style function, but think of sigs as a reference
|
||||
|
||||
#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE) \
|
||||
|| (defined(_POSIX_SOURCE) && _POSIX_SOURCE)
|
||||
sigemptyset(&savedSignalMask);
|
||||
// There's no "assign" or "copy" function, so we rely on (math) idempotence
|
||||
// of the or operator: a or a = a.
|
||||
sigorset(&savedSignalMask, sigs, sigs);
|
||||
#else
|
||||
// Without sigorset, our best bet is to assume that sigset_t is a type that
|
||||
// can be assigned directly, such as is the case for a sigset_t defined as
|
||||
// an integer type.
|
||||
savedSignalMask = *sigs;
|
||||
#endif
|
||||
|
||||
savedSignalMaskIsSet = true;
|
||||
}
|
||||
|
||||
void unix::saveSignalMask()
|
||||
{
|
||||
if (sigprocmask(SIG_BLOCK, nullptr, &savedSignalMask))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue