From d8f00dd1d1d40ec387583575149b1bf9bae79f32 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Thu, 9 May 2013 10:54:32 -0700
Subject: [PATCH] MAINT-2665 FIX Crashes not being reported in some cases made
 marker file lock use append, not truncate

---
 indra/llcommon/llapr.h        | 2 ++
 indra/newview/llappviewer.cpp | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index 034546c3f3..752574c65d 100755
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -182,8 +182,10 @@ typedef LLAtomic32<S32> LLAtomicS32;
 // abbreviated flags
 #define LL_APR_R (APR_READ) // "r"
 #define LL_APR_W (APR_CREATE|APR_TRUNCATE|APR_WRITE) // "w"
+#define LL_APR_A (APR_CREATE|APR_WRITE|APR_APPEND) // "w"
 #define LL_APR_RB (APR_READ|APR_BINARY) // "rb"
 #define LL_APR_WB (APR_CREATE|APR_TRUNCATE|APR_WRITE|APR_BINARY) // "wb"
+#define LL_APR_AB (APR_CREATE|APR_WRITE|APR_BINARY|APR_APPEND)
 #define LL_APR_RPB (APR_READ|APR_WRITE|APR_BINARY) // "r+b"
 #define LL_APR_WPB (APR_CREATE|APR_TRUNCATE|APR_READ|APR_WRITE|APR_BINARY) // "w+b"
 
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index dcddd0fbf5..7f56d7afdd 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3522,7 +3522,7 @@ bool LLAppViewer::anotherInstanceRunning()
 	{
 		// File exists, try opening with write permissions
 		LLAPRFile outfile ;
-		outfile.open(marker_file, LL_APR_WB);
+		outfile.open(marker_file, LL_APR_AB);
 		apr_file_t* fMarker = outfile.getFileHandle() ; 
 		if (!fMarker)
 		{
-- 
GitLab