index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | src/pacman/conf.c | 5 |
diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 2d3009ec..69562067 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -203,11 +203,14 @@ static int download_with_xfercommand(const char *url, const char *localpath, cleanup: /* restore the old cwd if we have it */ if(cwdfd >= 0) { + int ret; if(fchdir(cwdfd) != 0) { pm_printf(ALPM_LOG_ERROR, _("could not restore working directory (%s)\n"), strerror(errno)); } - close(cwdfd); + do { + ret = close(cwdfd); + } while(ret == -1 && errno == EINTR); } if(ret == -1) { |