diff --git a/src/c/main.d b/src/c/main.d index 934e4278f..c61a78833 100755 --- a/src/c/main.d +++ b/src/c/main.d @@ -812,6 +812,11 @@ cl_boot(int argc, char **argv) if (process != this) mp_process_join(process); } + /* FIXME! We need to do this because of a problem in GC + * When the thread exits, sometimes the dyld library gets + * called, and if we call dlopen() at the same time we + * cause ECL to hang */ + ecl_musleep(1e-3, 1); } #endif ECL_SET(@'ext::*program-exit-code*', code);