summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-10-05 21:50:58 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-10-05 21:50:58 +0000
commitaf15744967957d4c14be9a0024475e335a2c4470 (patch)
tree833fc4c77b65d0cedf06fb9d0063aab9fd18a34d /lib/libalpm/util.c
parentd7e781a54bc8aad793abd51fdb5f8f1c7cdae7ad (diff)
downloadpacman-af15744967957d4c14be9a0024475e335a2c4470.tar.xz
Applied reworked patch from VMiklos (vmiklos@frugalware.org)
Close the lock file descriptor upon handle release
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index d08af4e2..a4b9e0ff 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -212,17 +212,14 @@ int _alpm_lckmk(char *file)
return(-1);
}
}
- return(fd > 0 ? 0 : -1);
- return(0);
+ return(fd > 0 ? fd : -1);
}
/* Remove a lock file
*/
int _alpm_lckrm(char *file)
{
- /* ORE
- we should close the file descriptor opened by lckmk */
return(unlink(file) == -1);
}