summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-03-21 06:59:55 -0400
committerOz Linden <oz@lindenlab.com>2011-03-21 06:59:55 -0400
commitcb47ae3264f3d9d22add17f2cbc5699c8620705f (patch)
treec426adad23154cb74711a78174c412ab2a2b8034 /indra/llcommon
parent2cddf137e3c785dc9efbe7e12b90d239d8eaa958 (diff)
parent8e0ea2fb7271b6d559ec751d47eb8b2992d4611d (diff)
merge changes for storm-971
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llprocesslauncher.cpp24
-rw-r--r--indra/llcommon/llversionviewer.h4
2 files changed, 24 insertions, 4 deletions
diff --git a/indra/llcommon/llprocesslauncher.cpp b/indra/llcommon/llprocesslauncher.cpp
index 4b0f6b0251..10950181fd 100644
--- a/indra/llcommon/llprocesslauncher.cpp
+++ b/indra/llcommon/llprocesslauncher.cpp
@@ -103,10 +103,30 @@ int LLProcessLauncher::launch(void)
char *args2 = new char[args.size() + 1];
strcpy(args2, args.c_str());
- if( ! CreateProcessA( NULL, args2, NULL, NULL, FALSE, 0, NULL, NULL, &sinfo, &pinfo ) )
+ const char * working_directory = 0;
+ if(!mWorkingDir.empty()) working_directory = mWorkingDir.c_str();
+ if( ! CreateProcessA( NULL, args2, NULL, NULL, FALSE, 0, NULL, working_directory, &sinfo, &pinfo ) )
{
- // TODO: do better than returning the OS-specific error code on failure...
result = GetLastError();
+
+ LPTSTR error_str = 0;
+ if(
+ FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ result,
+ 0,
+ (LPTSTR)&error_str,
+ 0,
+ NULL)
+ != 0)
+ {
+ char message[256];
+ wcstombs(message, error_str, 256);
+ message[255] = 0;
+ llwarns << "CreateProcessA failed: " << message << llendl;
+ LocalFree(error_str);
+ }
+
if(result == 0)
{
// Make absolutely certain we return a non-zero value on failure.
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 3838b2b16c..117d96ffa6 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -28,8 +28,8 @@
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 2;
-const S32 LL_VERSION_MINOR = 5;
-const S32 LL_VERSION_PATCH = 3;
+const S32 LL_VERSION_MINOR = 6;
+const S32 LL_VERSION_PATCH = 1;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Developer";