user.o: user.h common.h log.h subproc.h util.h
util.o: util.h common.h log.h
uts.o: uts.h common.h log.h
-config.pb-c.o: config.pb-c.h
return true;
}
-static uint8_t subprocCloneStack[PTHREAD_STACK_MIN * 2];
+/* Will be used inside the child process only, so it's save to have it in BSS */
+static uint8_t subprocCloneStack[128 * 1024]; /* 128 KiB */
+/* Cannot be on the stack, as the child's stack pointer will change after clone() */
static __thread jmp_buf env;
static int subprocCloneFunc(void *arg __attribute__ ((unused)))
}
/*
- * Avoid problems with caching of PID/TID in glibc - when using syscall(__NR_clone) glibc will
+ * Avoid problems with caching of PID/TID in glibc - when using syscall(__NR_clone) glibc doesn't
* not update internal PID/TID caches, which can lead to invalid values returned by getpid(),
* or wrong PID/TIDs being used in raise()/abort() functions
*/