summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 5fb4f2bb..dcd81cea 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -115,7 +115,7 @@ int _alpm_handle_lock(alpm_handle_t *handle)
do {
fd = open(handle->lockfile, O_WRONLY | O_CREAT | O_EXCL, 0000);
} while(fd == -1 && errno == EINTR);
- if(fd > 0) {
+ if(fd >= 0) {
FILE *f = fdopen(fd, "w");
fprintf(f, "%ld\n", (long)getpid());
fflush(f);