retry unix.EINTR for container init process

When running a script from an azure file share interrupted syscall
occurs quite frequently, to remedy this add retries around execve
syscall, when EINTR is returned.

Signed-off-by: Maksim An <maksiman@microsoft.com>
This commit is contained in:
Maksim An
2021-06-01 16:44:17 -07:00
parent 5547b5774f
commit e39ad65059
2 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -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