Skip to content

Commit f9b1047

Browse files
saukacodebot
authored andcommitted
gnb: move cleaning up of old cgroups to the start of static host description initialization
1 parent 49980d4 commit f9b1047

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

apps/gnb/gnb.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ int main(int argc, char** argv)
173173
// Enable backtrace.
174174
enable_backtrace();
175175

176-
// Clean cgroups from a previous run.
177-
cleanup_cgroups();
178-
179176
// Setup and configure config parsing.
180177
CLI::App app("srsGNB application");
181178
app.config_formatter(create_yaml_config_parser());

lib/support/unique_thread.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include "srsran/support/unique_thread.h"
12+
#include "srsran/support/sysinfo.h"
1213
#include "fmt/ostream.h"
1314
#include <cstdio>
1415
#include <pthread.h>
@@ -27,6 +28,9 @@ struct cpu_description {
2728
/// \brief Compute the CPU set of the caller thread.
2829
cpu_description compute_machine_desc()
2930
{
31+
// Clean-up cgroups possibly left from a previous run.
32+
cleanup_cgroups();
33+
3034
cpu_description desc;
3135
cpu_set_t& cpuset = desc.cpuset;
3236

0 commit comments

Comments
 (0)