diff options
author | Jonathan Conder <jonno.conder@gmail.com> | 2011-02-05 13:39:37 +1300 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-02-27 13:32:41 -0600 |
commit | acd9269478dbc40f1dac64d8f6ddfbb5f562ad09 (patch) | |
tree | da62cb17e4cc96ebb4d313c9f8d514b8e9d67e49 /lib/libalpm/util.h | |
parent | e8f799ba83904db2a347e7d37fe217216a0faf90 (diff) | |
download | pacman-acd9269478dbc40f1dac64d8f6ddfbb5f562ad09.tar.xz |
Fix double close of the lock file
According to FOPEN(3), using fclose on an fdopen'd file stream also
closes the underlying file descriptor. This happened in _alpm_lckmk
(util.c), which meant that when alpm_trans_release closed it again, the
log file (which reused the original file descriptor) was closed instead.
Signed-off-by: Jonathan Conder <jonno.conder@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.h')
-rw-r--r-- | lib/libalpm/util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h index 015e9bf5..930503b7 100644 --- a/lib/libalpm/util.h +++ b/lib/libalpm/util.h @@ -80,7 +80,7 @@ int _alpm_makepath(const char *path); int _alpm_makepath_mode(const char *path, mode_t mode); int _alpm_copyfile(const char *src, const char *dest); char *_alpm_strtrim(char *str); -int _alpm_lckmk(void); +FILE *_alpm_lckmk(void); int _alpm_lckrm(void); int _alpm_unpack_single(const char *archive, const char *prefix, const char *fn); int _alpm_unpack(const char *archive, const char *prefix, alpm_list_t *list, int breakfirst); |