aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2024-10-03 23:02:33 -0400
committerTest_User <hax@andrewyu.org>2024-10-03 23:02:33 -0400
commit905bb8307b93b68db50b7fdd25538cb5b38c4533 (patch)
tree21a4a6a9d468d8f4db2936dd3b35c316c9168250
parentAvoid needless locking when attempting to unlock, instead check the value dir... (diff)
downloadhaxircd-master.tar.gz
haxircd-master.zip
Deadlock, but intentionally, bc pthread weirdnessHEADmaster
-rw-r--r--real_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/real_main.c b/real_main.c
index 45fe08a..13ba48b 100644
--- a/real_main.c
+++ b/real_main.c
@@ -146,7 +146,10 @@ int real_main(void) {
return 1;
#endif
- pthread_exit(0);
+ MUTEX_TYPE do_not_exit;
+ mutex_init(&do_not_exit);
+ mutex_lock(&do_not_exit);
+ mutex_lock(&do_not_exit); // Yay
return 0;
}