"memory_guaranteed", PAKFIRE_BUILD_MEMORY_GUARANTEED);
if (memory_guaranteed) {
r = pakfire_cgroup_set_guaranteed_memory(build->cgroup, memory_guaranteed);
- if (r)
- goto ERROR;
+ if (r < 0) {
+ switch (-r) {
+ case ENOTSUP:
+ ERROR(build->ctx, "Could not apply the memory guarantee. Ignoring.\n");
+ break;
+
+ default:
+ goto ERROR;
+ }
+ }
}
// Limit memory
size_t memory_limit = pakfire_config_get_bytes(config, "build", "memory_limit", 0);
if (memory_limit) {
r = pakfire_cgroup_set_memory_limit(build->cgroup, memory_limit);
- if (r)
- goto ERROR;
+ if (r < 0) {
+ switch (-r) {
+ case ENOTSUP:
+ ERROR(build->ctx, "Could not apply the memory limit. Ignoring.\n");
+ break;
+
+ default:
+ goto ERROR;
+ }
+ }
}
// Set PID limit
"pid_limit", PAKFIRE_BUILD_PID_LIMIT);
if (pid_limit) {
r = pakfire_cgroup_set_pid_limit(build->cgroup, pid_limit);
- if (r)
- goto ERROR;
+ if (r < 0) {
+ switch (-r) {
+ case ENOTSUP:
+ ERROR(build->ctx, "Could not apply the PID limit. Ignoring.\n");
+ break;
+
+ default:
+ goto ERROR;
+ }
+ }
}
ERROR: