summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/main.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-07-08 01:04:31 +0000
committerKarl Berry <karl@freefriends.org>2009-07-08 01:04:31 +0000
commit17ee31b51081b8281b652fa06b997918003f7772 (patch)
treec5c1420540fe9a31454c1450ec5d96c096f91a9b /Build/source/utils/asymptote/main.cc
parentbf914f81a2ff8552e1438251f4b6b56f9acf0b90 (diff)
asymptote 1.80
git-svn-id: svn://tug.org/texlive/trunk@14179 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/main.cc')
-rw-r--r--Build/source/utils/asymptote/main.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/Build/source/utils/asymptote/main.cc b/Build/source/utils/asymptote/main.cc
index ad8e6292e0c..0cd7a281d58 100644
--- a/Build/source/utils/asymptote/main.cc
+++ b/Build/source/utils/asymptote/main.cc
@@ -154,6 +154,12 @@ void *asymain(void *A)
int status;
while(wait(&status) > 0);
}
+#ifdef HAVE_LIBGL
+#ifdef HAVE_LIBPTHREAD
+ if(gl::glthread)
+ pthread_join(gl::mainthread,NULL);
+#endif
+#endif
exit(em.processStatus() || interact::interactive ? 0 : 1);
}
@@ -173,15 +179,13 @@ int main(int argc, char *argv[])
#ifdef HAVE_LIBPTHREAD
if(gl::glthread) {
- pthread_t thread;
try {
- if(pthread_create(&thread,NULL,asymain,&args) == 0) {
- gl::mainthread=pthread_self();
+ if(pthread_create(&gl::mainthread,NULL,asymain,&args) == 0) {
while(true) {
camp::glrenderWrapper();
gl::initialize=true;
}
- }
+ } else gl::glthread=false;
} catch(std::bad_alloc&) {
outOfMemory();
}