![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include "nix/util/types.hh"#include "nix/util/error.hh"#include "nix/util/fun.hh"#include "nix/util/logging.hh"#include <functional>#include "nix/util/signals-impl.hh"Go to the source code of this file.
Classes | |
| struct | nix::InterruptCallback |
Macros | |
| #define | NIX_SIG_MULTI_INT SIGTSTP |
Enumerations | |
| enum class | nix::SignalType { Int , Stop , Cont , Winch } |
Functions | |
| void | nix::checkInterrupt () |
| nix::MakeError (Interrupted, BaseError) | |
| nix::MakeError (Cancelled, BaseError) | |
| std::unique_ptr< InterruptCallback > | nix::createSignalCallback (SignalType type, fun< void()> callback) |
| std::unique_ptr< InterruptCallback > | nix::createInterruptCallback (fun< void()> callback) |
|
strong |
Portable identifiers for the signal events that callbacks can be registered for via createSignalCallback().
|
inline |
Throw Interrupted exception if the process has been interrupted.
Call this in long-running loops and between slow operations to terminate them as needed.
|
inline |
Register a function that gets called on SIGINT (in a non-signal context).
|
inline |
Register a function that gets called from the signal handler thread (in a non-signal context) when the given signal type is received.
| nix::MakeError | ( | Interrupted | , |
| BaseError | ) |