diff options
Diffstat (limited to 'graphics/asymptote/main.cc')
-rw-r--r-- | graphics/asymptote/main.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/graphics/asymptote/main.cc b/graphics/asymptote/main.cc index 486e84ef78..bc5e7df048 100644 --- a/graphics/asymptote/main.cc +++ b/graphics/asymptote/main.cc @@ -50,6 +50,10 @@ using namespace settings; using interact::interactive; +namespace gl { +extern bool glexit; +} + namespace run { void purge(); } @@ -179,8 +183,12 @@ void *asymain(void *A) } #ifdef HAVE_GL #ifdef HAVE_PTHREAD - if(gl::glthread && !getSetting<bool>("offscreen")) { + if(gl::glthread) { +#ifdef __MSDOS__ // Signals are unreliable in MSWindows + gl::glexit=true; +#else pthread_kill(gl::mainthread,SIGURG); +#endif pthread_join(gl::mainthread,NULL); } #endif @@ -216,7 +224,7 @@ int main(int argc, char *argv[]) #endif gl::glthread=usethreads ? getSetting<bool>("threads") : false; #if HAVE_PTHREAD - +#ifndef HAVE_LIBOSMESA if(gl::glthread) { pthread_t thread; try { @@ -237,6 +245,7 @@ int main(int argc, char *argv[]) } } #endif +#endif gl::glthread=false; #endif asymain(&args); |