about summary refs log tree commit diff
path: root/stack-fix.c
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-02-26 17:04:44 +0100
committerThibaut Girka <thib@sitedethib.com>2019-02-26 17:04:44 +0100
commit0158937fc2345a83f8ee5a64e85b14cabfe4b1e7 (patch)
tree79872e72c27d6371620c0dd8f04700aa0094020c /stack-fix.c
parentd82de360c13894746d3974d11c9505c8937ebdee (diff)
parenta5e7ada62fa2824be158f0b3bed7f3c39ce9c0fa (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- Dockerfile
  Took upstream version and reverted f13ebd02c91776ddb88b5178bf9015c6e0f1ca80.
  Hopefuly it's not needed anymore.
- app/controllers/api/v1/search_controller.rb
  The conflict was due to us raising the number of results returned.
  Upstream raised it further, so took it.
- config/locales/de.yml
  Took upstream changes to theme translation strings.
- config/locales/gl.yml
  Took upstream changes to theme translation strings.
- config/locales/nl.yml
  Took upstream changes to theme translation strings.
- config/locales/sk.yml
  Took upstream changes to theme translation strings.
Diffstat (limited to 'stack-fix.c')
-rw-r--r--stack-fix.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/stack-fix.c b/stack-fix.c
deleted file mode 100644
index 09311a8f0..000000000
--- a/stack-fix.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <dlfcn.h>
-#include <pthread.h>
-#include <stdio.h>
-
-// THIS IS TO AVOID A SIGFAULT WHEN RUNNING python3.6 manage.py runserver
-// This should be fixed at some point by Alpine and/or Python
-// Check this issue for more info
-// https://github.com/docker-library/python/issues/211
-typedef int (*func_t)(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg);
-
-int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg) {
-
-    pthread_attr_t local;
-    int used = 0, ret;
-
-    if (!attr) {
-        used = 1;
-        pthread_attr_init(&local);
-        attr = &local;
-    }
-    pthread_attr_setstacksize((void*)attr, 2 * 1024 * 1024); // 2 MB
-
-    func_t orig = (func_t)dlsym(RTLD_NEXT, "pthread_create");
-
-    ret = orig(thread, attr, start_routine, arg);
-
-    if (used) {
-        pthread_attr_destroy(&local);
-    }
-
-    return ret;
-}