1
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2
// vim: ts=8 sw=2 smarttab
4
* Ceph - scalable distributed file system
6
* Copyright (C) 2011 New Dream Network
8
* This is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License version 2.1, as published by the Free Software
11
* Foundation. See file COPYING.
15
#ifndef CEPH_COMMON_SIGNAL_H
16
#define CEPH_COMMON_SIGNAL_H
21
// Install the standard Ceph signal handlers
22
void install_standard_sighandlers(void);
24
// Returns a string showing the set of blocked signals for the calling thread.
25
// Other threads may have a different set (this is per-thread thing).
26
std::string signal_mask_to_str();
28
// Block all signals. On success, stores the old set of blocked signals in
29
// old_sigset. On failure, stores an invalid set of blocked signals in
31
void block_all_signals(sigset_t *old_sigset);
33
// Restore the set of blocked signals. Will not restore an invalid set of
35
void restore_sigset(const sigset_t *old_sigset);
37
// Unblock all signals. On success, stores the old set of blocked signals in
38
// old_sigset. On failure, stores an invalid set of blocked signals in
40
void unblock_all_signals(sigset_t *old_sigset);