UNISTDX_IPC_SIGNAL
using signal_type = int

Alias for signal type.

using signal_info_type = ::siginfo_t

Alias for siginfo_t system type.

using sigaction_type = struct ::sigaction

Alias for sigaction system type.

enum signal: signal_type

Process signals.

  • hang_up = SIGHUP
  • keyboard_interrupt = SIGINT
  • quit = SIGQUIT
  • illegal_instruction = SIGILL
  • breakpoint = SIGTRAP
  • abort = SIGABRT
  • floating_point_exception = SIGFPE
  • kill = SIGKILL
  • bad_memory_access = SIGBUS
  • segmentation_fault = SIGSEGV
  • bad_argument = SIGSYS
  • broken_pipe = SIGPIPE
  • alarm = SIGALRM
  • terminate = SIGTERM
  • urgent = SIGURG
  • coprocessor_stack_fault = SIGSTKFLT
  • stop = SIGSTOP
  • terminal_stop = SIGTSTP
  • resume = SIGCONT
  • child = SIGCHLD
  • terminal_input = SIGTTIN
  • terminal_output = SIGTTOU
  • poll = SIGPOLL
  • cpu_time_limit_exceeded = SIGXCPU
  • file_size_limit_exceeded = SIGXFSZ
  • virtual_alarm = SIGVTALRM
  • profile = SIGPROF
  • terminal_window_resize = SIGWINCH
  • user_defined_1 = SIGUSR1
  • power_failure = SIGPWR
  • user_defined_2 = SIGUSR2
class sys::signal_set

Signal set.

Base classes
  • public sigset_t
Methods
class sys::signal_action

Signal callback.

Base classes
  • public sigaction_type
Enumerations
  • enum flag: unsigned int
Methods
  • mask(signal_set rhs) -> void
  • mask() const -> signal_set
  • flags(flag rhs) -> void
  • flags() const -> flag
  • signal_action(void(*)(int, signal_information *, void *) func, flag flags = flag::info)
  • signal_action(void(*)(int, siginfo_t *, void *) func, flag flags = flag::info)

    Construct signal action from new-style signal handler.

  • signal_action(void(*)(int) func)

    Construct signal action from old-style signal handler.

  • signal_action()
class sys::signal_guard

Blocks/unblocks specified signals upon creation/destruction.

Methods
class sys::signal_information
Base classes
  • public siginfo_t
Enumerations
  • enum codes: int
Methods
  • call() const -> calls
  • fd() const -> fd_type
  • address() -> void *
  • address() const -> const void *
  • exit_code() const -> int
  • system_cpu_time() const -> clock_t
  • user_cpu_time() const -> clock_t
  • user_id() const -> uid_type
  • process_id() const -> pid_type
  • signal() const -> inline ::sys::signal
  • error_condition() const -> std::errc
block_signals(const signal_set & signals) -> void

Block signals for the current process.

bad_call

unblock_signals(const signal_set & signals) -> void

Unblock signals for the current process.

bad_call

to_string(signal s) -> const char *
ignore_signal(signal s) -> void

Ignore specified signal.

bad_call

By default any signal for which callback function is not set may kill the process. This routine allows to ignore specified signals.

bind_signal(signal sig, const signal_action & action) -> void

Set signal callback function.

bad_call

operator<<(std::ostream & out, const signal rhs) -> std::ostream &

Output signal name.

UNISTDX_FLAGS(signal_action::flag)
default_action(signal s) -> void

Use default action for the specified signal.

bad_call