ca682eaf0a
- NodeBase, Signal, FlowDef, V210 shared headers - testpattern node: SMPTE 75% color bars writer at 25fps - fakesink node: non-blocking MXL reader with per-second stats - studio-manager: FlowGraph data model, graph-driven fork/exec launcher - mxl pinned as submodule at 0ae1dc5 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
392 B
C++
21 lines
392 B
C++
#pragma once
|
|
#include <atomic>
|
|
#include <csignal>
|
|
|
|
namespace dmf {
|
|
|
|
inline std::atomic<bool> g_running{true};
|
|
|
|
namespace detail {
|
|
inline void on_signal(int) noexcept {
|
|
g_running.store(false, std::memory_order_relaxed);
|
|
}
|
|
}
|
|
|
|
inline void install_signal_handlers() {
|
|
std::signal(SIGTERM, detail::on_signal);
|
|
std::signal(SIGINT, detail::on_signal);
|
|
}
|
|
|
|
} // namespace dmf
|