From 57090d8cba65988b822a215947a5fb44d55790d0 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Sat, 26 Oct 2013 11:32:15 -0400 Subject: alpm_handle: store lock file descriptor There was a brief window between opening the file descriptor and creating a stream to it. If the process was interrupted during that window the lock file would not be removed correctly. The pid is no longer printed to the lock file as this was virtually meaningless for lock files on NFS. Fixes FS#35603 Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- 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 5e84d586..a4e2cf72 100644 --- a/lib/libalpm/handle.h +++ b/lib/libalpm/handle.h @@ -55,7 +55,7 @@ struct __alpm_handle_t { alpm_db_t *db_local; /* local db pointer */ alpm_list_t *dbs_sync; /* List of (alpm_db_t *) */ FILE *logstream; /* log file stream pointer */ - FILE *lckstream; /* lock file stream pointer if one exists */ + int lockfd; /* lock file descriptor */ alpm_trans_t *trans; #ifdef HAVE_LIBCURL -- cgit v1.2.3-24-g4f1b