mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Add a function for fetching the RTTIME limit
We can use this to more easily diagnose issues caused by PipeWire.
This commit is contained in:
@@ -48,6 +48,15 @@ bool set_realtime_priority(bool sched_fifo, int priority) noexcept {
|
||||
¶ms) == 0;
|
||||
}
|
||||
|
||||
std::optional<rlim_t> get_rttime_limit() noexcept {
|
||||
rlimit limits{};
|
||||
if (getrlimit(RLIMIT_RTTIME, &limits) == 0) {
|
||||
return limits.rlim_cur;
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
bool pid_running(pid_t pid) {
|
||||
// With regular individually hosted plugins we can simply check whether the
|
||||
// process is still running, however Boost.Process does not allow you to do
|
||||
|
||||
Reference in New Issue
Block a user