Skip to content

Commit ad256cb

Browse files
committed
Remove logging.
1 parent 3828a4a commit ad256cb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

judge/runguard.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -570,14 +570,14 @@ void cgroup_create()
570570
verbose("cpuset undefined");
571571
}
572572

573-
if ( (cg_controller = cgroup_add_controller(cg, "cpu"))==nullptr ) {
574-
error(0,"cgroup_add_controller cpu");
573+
if (!is_cgroup_v2) {
574+
if ( (cg_controller = cgroup_add_controller(cg, "cpu"))==nullptr ) {
575+
error(0,"cgroup_add_controller cpu");
576+
}
577+
if ((cg_controller = cgroup_add_controller(cg, "cpuacct")) == nullptr) {
578+
error(0, "cgroup_add_controller cpuacct");
579+
}
575580
}
576-
if (!is_cgroup_v2) {
577-
if ((cg_controller = cgroup_add_controller(cg, "cpuacct")) == nullptr) {
578-
error(0, "cgroup_add_controller cpuacct");
579-
}
580-
}
581581

582582
/* Perform the actual creation of the cgroup */
583583
if ( (ret = cgroup_create_cgroup(cg, 1))!=0 ) error(ret,"creating cgroup");
@@ -1272,7 +1272,7 @@ int main(int argc, char **argv)
12721272
}
12731273
}
12741274

1275-
cgroup_set_default_logger(CGROUP_LOG_DEBUG);
1275+
// cgroup_set_default_logger(CGROUP_LOG_DEBUG);
12761276

12771277
/* Make libcgroup ready for use */
12781278
ret = cgroup_init();

0 commit comments

Comments
 (0)