summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llprocesslauncher.cpp9
-rw-r--r--indra/llcommon/llqueuedthread.h2
-rw-r--r--indra/llcommon/llthread.cpp24
-rw-r--r--indra/llcommon/llversionviewer.h2
4 files changed, 21 insertions, 16 deletions
diff --git a/indra/llcommon/llprocesslauncher.cpp b/indra/llcommon/llprocesslauncher.cpp
index 81e5f8820d..4b0f6b0251 100644
--- a/indra/llcommon/llprocesslauncher.cpp
+++ b/indra/llcommon/llprocesslauncher.cpp
@@ -265,14 +265,7 @@ int LLProcessLauncher::launch(void)
delete[] fake_argv;
mProcessID = id;
-
- // At this point, the child process will have been created (since that's how vfork works -- the child borrowed our execution context until it forked)
- // If the process doesn't exist at this point, the exec failed.
- if(!isRunning())
- {
- result = -1;
- }
-
+
return result;
}
diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h
index c75e0e2bbf..a53b22f6fc 100644
--- a/indra/llcommon/llqueuedthread.h
+++ b/indra/llcommon/llqueuedthread.h
@@ -179,7 +179,7 @@ public:
void waitOnPending();
void printQueueStats();
- S32 getPending();
+ virtual S32 getPending();
bool getThreaded() { return mThreaded ? true : false; }
// Request accessors
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 148aaf8aed..49d05ef411 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -63,9 +63,6 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
{
LLThread *threadp = (LLThread *)datap;
- // Set thread state to running
- threadp->mStatus = RUNNING;
-
// Run the user supplied function
threadp->run();
@@ -167,10 +164,25 @@ void LLThread::shutdown()
void LLThread::start()
{
- apr_thread_create(&mAPRThreadp, NULL, staticRun, (void *)this, mAPRPoolp);
+ llassert(isStopped());
+
+ // Set thread state to running
+ mStatus = RUNNING;
- // We won't bother joining
- apr_thread_detach(mAPRThreadp);
+ apr_status_t status =
+ apr_thread_create(&mAPRThreadp, NULL, staticRun, (void *)this, mAPRPoolp);
+
+ if(status == APR_SUCCESS)
+ {
+ // We won't bother joining
+ apr_thread_detach(mAPRThreadp);
+ }
+ else
+ {
+ mStatus = STOPPED;
+ llwarns << "failed to start thread " << mName << llendl;
+ ll_apr_warn_status(status);
+ }
}
//============================================================================
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 04f72d93b4..5fa38db041 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -35,7 +35,7 @@ const S32 LL_VERSION_BUILD = 211776;
const char * const LL_CHANNEL = "Second Life Developer";
#if LL_DARWIN
-const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.snowglobe.viewer";
+const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.indra.viewer";
#endif
#endif