diff options
author | Norbert Preining <norbert@preining.info> | 2020-07-08 03:01:45 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-07-08 03:01:45 +0000 |
commit | 8c3fedd243b69349b426144e5e2b94ef4aea6a4c (patch) | |
tree | f5842753f11a90141f3cc2e356c3a04766e8d81e /graphics/asymptote/main.cc | |
parent | ef87f13c4503a2aa4a9098cbf33e0bfcad19008e (diff) |
CTAN sync 202007080301
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); |