From acd9269478dbc40f1dac64d8f6ddfbb5f562ad09 Mon Sep 17 00:00:00 2001 From: Jonathan Conder Date: Sat, 5 Feb 2011 13:39:37 +1300 Subject: 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 Signed-off-by: Dan McGee --- lib/libalpm/handle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/handle.h') 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 */ -- cgit v1.2.3-24-g4f1b