Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libcontainer/standard_init_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (l *linuxStandardInit) Init() error {
return err
}

if err := unix.Exec(name, l.config.Args[0:], os.Environ()); err != nil {
if err := system.Exec(name, l.config.Args[0:], os.Environ()); err != nil {
return fmt.Errorf("can't exec user process: %w", err)
}
return nil
Expand Down
11 changes: 10 additions & 1 deletion libcontainer/system/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ func Execv(cmd string, args []string, env []string) error {
return err
}

return unix.Exec(name, args, env)
return Exec(name, args, env)
}

func Exec(cmd string, args []string, env []string) error {
for {
err := unix.Exec(cmd, args, env)
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
return err
}
}
}

func Prlimit(pid, resource int, limit unix.Rlimit) error {
Expand Down