TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
triqs::signal_handler

Detailed Description

Signal handling utilities for the TRIQS library.

Classes

class  exception
 Empty exception type that callers may use to signal a graceful shutdown. More...

Functions

int last ()
 Integer identifier of the most recently received signal.
void pop ()
 Pop the most recently received signal from the queue (no-op if empty).
bool received (bool pop=false)
 Whether at least one signal has been queued since the last reset.
void start ()
 Install the TRIQS signal handler.
void stop ()
 Restore the previous signal disposition.

Function Documentation

◆ received()

bool triqs::signal_handler::received ( bool pop = false)

Whether at least one signal has been queued since the last reset.

Parameters
popIf true, also pop the most recent queued signal before returning.
Returns
True if at least one signal is queued.

Definition at line 61 of file signal_handler.cpp.

◆ start()

void triqs::signal_handler::start ( )

Install the TRIQS signal handler.

After this call, raised signals are queued instead of terminating the process.

Definition at line 41 of file signal_handler.cpp.

◆ stop()

void triqs::signal_handler::stop ( )

Restore the previous signal disposition.

Subsequent signals revert to their default behavior.

Definition at line 56 of file signal_handler.cpp.