Skip to content

Commit a0b3696

Browse files
committed
Explicitly create the proxied main thread as detached. NFC.
1 parent f49a930 commit a0b3696

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

system/lib/pthread/emscripten_proxy_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ static void* _main_thread(void* param) {
2525
int emscripten_proxy_main(int argc, char** argv) {
2626
pthread_attr_t attr;
2727
pthread_attr_init(&attr);
28+
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
2829
// Use the size of the current stack, which is the normal size of the stack
2930
// that main() would have without PROXY_TO_PTHREAD.
3031
pthread_attr_setstacksize(&attr, emscripten_stack_get_base() - emscripten_stack_get_end());

0 commit comments

Comments
 (0)