Skip to content

Commit

Permalink
chore: align rlimit
Browse files Browse the repository at this point in the history
  • Loading branch information
nixpig committed Dec 9, 2024
1 parent c22f408 commit bf6c8af
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions container/container_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"syscall"

"github.com/containerd/cgroups/v3/cgroup1"
"github.com/nixpig/brownie/container/cgroups"
"github.com/nixpig/brownie/container/namespace"
"github.com/nixpig/brownie/container/terminal"
"github.com/nixpig/brownie/internal/ipc"
Expand Down Expand Up @@ -168,12 +167,12 @@ func (c *Container) Init(reexec string, arg string, log *zerolog.Logger) error {
reexecCmd.Env = append(reexecCmd.Env, c.Spec.Process.Env...)
}

if c.Spec.Process != nil && c.Spec.Process.Rlimits != nil {
if err := cgroups.SetRlimits(c.Spec.Process.Rlimits); err != nil {
log.Error().Err(err).Msg("set rlimits")
return err
}
}
// if c.Spec.Process != nil && c.Spec.Process.Rlimits != nil {
// if err := cgroups.SetRlimits(c.Spec.Process.Rlimits); err != nil {
// log.Error().Err(err).Msg("set rlimits")
// return err
// }
// }

reexecCmd.Stdin = c.Opts.Stdin
reexecCmd.Stdout = c.Opts.Stdout
Expand Down

0 comments on commit bf6c8af

Please sign in to comment.