summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/trans.c5
-rw-r--r--lib/libalpm/util.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index d6b165d3..f996c02c 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -30,7 +30,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
-#include <unistd.h>
#include <errno.h>
/* libalpm */
@@ -205,7 +204,7 @@ int SYMEXPORT alpm_trans_release()
/* unlock db */
if(handle->lckfd != -1) {
- close(handle->lckfd);
+ while(close(handle->lckfd) == -1 && errno == EINTR);
handle->lckfd = -1;
}
if(_alpm_lckrm()) {
@@ -576,7 +575,7 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
/* this code runs for the parent only (wait on the child) */
pid_t retpid;
int status;
- retpid = waitpid(pid, &status, 0);
+ while((retpid = waitpid(pid, &status, 0)) == -1 && errno == EINTR);
if(retpid == -1) {
_alpm_log(PM_LOG_ERROR, _("call to waitpid failed (%s)\n"),
strerror(errno));
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index b26c9702..da3463b0 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -254,7 +254,8 @@ int _alpm_lckmk()
_alpm_makepath(dir);
FREE(dir);
- fd = open(file, O_WRONLY | O_CREAT | O_EXCL, 0000);
+ while((fd = open(file, O_WRONLY | O_CREAT | O_EXCL, 0000)) == -1
+ && errno == EINTR);
return(fd > 0 ? fd : -1);
}