Closed rakslice closed 3 years ago
There isn't any way to tell what pthread attr values are going to cause a problem for the pthread_create
ahead of time AFAICT. The calls to set the values aren't reporting any errors.
I implemented that first solution of detecting proot in https://github.com/rakslice/macemu/commits/proot_fix
A BII build without JIT in ubuntu 20 04 armhf port running on android 9 pie via Termux proot-distro fails to launch, giving errors on
pthread_create
of threads (60hz thread, ethernet thread). In this scenario the pthread functionality available is limited to what is exposed by the android host system, which may be relevant.One of the error messages is missing a newline.
It seems that if the pthread attr settings BII requests aren't compatible with the permissions situation, creating the thread just fails.
Disabling the
geteuid() == 0
case inSet_pthread_attr()
makes the problem go away -- separately from whatever pthread limitations we have from android, we also have the limitations of only regular user permissions despite running with apparent usergeteuid() == 0