Skip to content

Commit

Permalink
Handle EINTR from syscall
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Apr 28, 2021
1 parent b254970 commit ce2d86a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/upgradecmd_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ func (c *Config) runUpgradeCmd(cmd *cobra.Command, args []string) error {
Str("arg0", arg0).
Strs("argv", argv).
Msg("exec")
return syscall.Exec(arg0, argv, os.Environ())
err = syscall.Exec(arg0, argv, os.Environ())
for errors.Is(err, syscall.EINTR) {
err = syscall.Exec(arg0, argv, os.Environ())
}
return err
}

func (c *Config) getChecksums(ctx context.Context, rr *github.RepositoryRelease) (map[string][]byte, error) {
Expand Down

0 comments on commit ce2d86a

Please sign in to comment.