Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/handle.h
diff options
context:
space:
mode:
authorJonathan Conder <jonno.conder@gmail.com>2011-02-05 13:39:37 +1300
committerDan McGee <dan@archlinux.org>2011-02-27 13:32:41 -0600
commitacd9269478dbc40f1dac64d8f6ddfbb5f562ad09 (patch)
treeda62cb17e4cc96ebb4d313c9f8d514b8e9d67e49 /lib/libalpm/handle.h
parente8f799ba83904db2a347e7d37fe217216a0faf90 (diff)
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/handle.h')
-rw-r--r--lib/libalpm/handle.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index fa29d112..2d962fe6 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -34,7 +34,7 @@ typedef struct _pmhandle_t {
pmdb_t *db_local; /* local db pointer */
alpm_list_t *dbs_sync; /* List of (pmdb_t *) */
FILE *logstream; /* log file stream pointer */
- int lckfd; /* lock file descriptor if one exists */
+ FILE *lckstream; /* lock file stream pointer if one exists */
pmtrans_t *trans;
/* callback functions */